What is XML ?

  • 70seven
  • Newbie
  • Newbie
  • User avatar
  • Posts: 12
  • Loc: Ottawa

Post 3+ Months Ago

Hey,

I have been programming for a couple of years now in C, Perl, Java, PHP, ColdFusion stuff like that. But I never learned XML. So here's my question, what is XML? What can it do for me? When would I need to use XML? I know its a vague question but if anyone can just give me a bit of info on XML I probablly could figure it out.

Thanks.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

I don't think there's much you can't do with xml.

Many program skinning engines grab information from xml, for instance if you use winamp take a look in your skins folder you'll more than likely find a few xml files.


http://www.minwar.com/learn/ASP/Advanced/XMLDatabase.asp
has a small tutorial on how you can use xml as a database.

RSS news readers pull content from xml files.

Some javascript DHTML menus pull information from xml files.

Basically xml is a way of encapsuling data inside tags, I guess an "object oriented text file" would be one way to describe it. Here's a basic example.
Code: [ Select ]
<?xml version="1.0"?>
  <documentElement>             <------------------top level element
       <childNode1> childNode1.text </childNode1>     <--childNode
       <childNode2> childNode2.text </childNode2>     <--childNode
  </documentElement>            <--------close of top level element
  1. <?xml version="1.0"?>
  2.   <documentElement>             <------------------top level element
  3.        <childNode1> childNode1.text </childNode1>     <--childNode
  4.        <childNode2> childNode2.text </childNode2>     <--childNode
  5.   </documentElement>            <--------close of top level element


Here's a good place to read up on it a little more,
http://www.w3schools.com/xml/
  • 70seven
  • Newbie
  • Newbie
  • User avatar
  • Posts: 12
  • Loc: Ottawa

Post 3+ Months Ago

Thanks a bunch Joebert, that was very helpfull. I guess I could have done my own reseach. The link you gave were great. I knew there was some way to use xml as a database but that was about it.
  • LazyJim
  • Student
  • Student
  • LazyJim
  • Posts: 92

Post 3+ Months Ago

hey joe I like that: "object oriented text file" :lol:

in addition, XML is designed to be a common language base understood by all computer platforms and my humans.

Upon that base, you can build other languages, for example: RSS.
You have to specify the meaning of the tags in your language, there is no <h1> or <p> or even <title> tags in XML, there are NO tags. You define some tags to mean what you want, and that meaning is documented in a DTD or XML Schema, which allows other people and computers to understand meaning of each peice of text.
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

XML is very powerful, and is usable across many formats and
platforms. It's great because YOU decide the how the tags are
set, you just have to follow the very basics of format for syntax.

http://www.xml.com is a great resource as well.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 88 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.