XML Examples

Discussion in 'OT Technology' started by RaginBajin, Mar 30, 2003.

  1. RaginBajin

    RaginBajin Have you punched a donkey today?

    Joined:
    Dec 24, 2001
    Messages:
    8,740
    Likes Received:
    0
    Location:
    NoVA
    I was wondering if anyone had some easy and quick examples of how they use XML.

    I am curious on seeing how it works. I am a bit confused on how it can be used, and it's possibilities. I thought it was mainly used for parsing files and it was universal, but now I see it being used for graphics,etc (ie Trillian skin,etc).
     
  2. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    I normally use XML for configuration files. That's about it.
     
  3. RaginBajin

    RaginBajin Have you punched a donkey today?

    Joined:
    Dec 24, 2001
    Messages:
    8,740
    Likes Received:
    0
    Location:
    NoVA
    Why not use a regular configuration file? Why you chose XML?
     
  4. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    When you say regular, what do you mean? A plain text file?

    I guess I chose XML because I'm used to it. It's used in many modern apps as config files (Apache, Tomcat, .NET apps, web.xml in J2EE web apps, etc.).
     
  5. RaginBajin

    RaginBajin Have you punched a donkey today?

    Joined:
    Dec 24, 2001
    Messages:
    8,740
    Likes Received:
    0
    Location:
    NoVA
    Yeah, I meant a regular text file. I never noticed Apache using xml,etc.

    Trying to find an example on the internet of XML.
     
  6. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    RDF feeds use XML (example view source, if you don't it just looks like text).
     
  7. skinjob

    skinjob Active Member

    Joined:
    Jan 6, 2001
    Messages:
    2,337
    Likes Received:
    0
    Location:
    Aztlán
    Don't think of XML as something that can be used instead of a text file. XML is simply a set of tools for creating a structured data format.

    In the configuration file example, one of the benefits of using XML is backward compatibility. If you use XML to format your configuration file, you can easily extend the format of the file to include features added to a new revision of your software while preserving backward compatability so that users of older versions of your software can still use the new version of your configuration file.

    Since the XML standard is so flexible yet simple, and because XML parsers are readily available, you're better off using XML when you need to save or exchange data instead of coming up with some proprietary format that becomes harder and harder to maintain as your software evolves.
     

Share This Page