POV-Ray : Newsgroups : povray.off-topic : XML: what's it good for? : Re: XML: what's it good for? Server Time
4 Sep 2024 09:18:01 EDT (-0400)
  Re: XML: what's it good for?  
From: Warp
Date: 19 Mar 2010 09:10:37
Message: <4ba377cd@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> The nice thing about XML is that, since it's a standard, anybody that 
> wants to can make up some format based on XML, and then anyone who 
> understands XML has some small chance of figuring out what it all means. 
> There are standard XML parsing and processing libraries. There are 
> standard tools for searching, sorting and transforming XML into other XML.

  There's one advantage of XML being standardized: It's an easy standard way
of encoding text in a way that any XML parser can understand.

  If you use a custom file format which must contain text which can use any
Unicode characters, you always have to either decide on an encoding format,
or add support for the user defining the character encoding (ISO Latin-1?
ISO Latin-9? UTF-8? UTF-16LE? UTF-16BE? EUC_JP? Shift-JIS? ISO 2022-JP?)
With XML you don't have to bother because XML libraries already support any
such character encodings out-of-the-box.

  Note that with XML, even if you specify a character encoding which doesn't
support the full Unicode character set (such as ISO Latin-1), you can *still*
specify any Unicode character regardless (using the &#...; format), so it's
not a problem.

  Thus it becomes a convenient way for programs to support text with any
standardized character encoding, without the program having to worry about
it (as long as it uses some competent XML parser library).

  Now, if XML was just a bit less verbose...

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.