whats xml?

and how can i use it or how can i understand

at which points or programs i can use xml




Answer this question

whats xml?

  • hwg_Maarten

    The X in XML stands for eXtensible. That means I can take Tillmans Friends.xml and add a phonenumber into the XML.

    <Person>
    <Name>Andreas</Name>
    <Age>31</Age>
    <Phone>+31-6-00000000</Phone>
    </Person>

    This addition will not affect any other applications using the Friends.xml as XML is insensitive to additions like that.

    You can read more at XML Developer Center or have a look at the wikipedia entry.



  • Zaib

    Its a way to store data. For example to save it somewhere or to pass it arround. XML has structure tags and content. The content is surrounded by the tags. Tags can build a hirarchie.

    Lets see this very simple XML called Friends.Xml that I create now:

    <Friends>

    <Person>

    <Name>Peter</Name>

    <Age>29</Age>

    </Person>

    <Person>

    <Name>Slomczyk</Name>

    <Age>34</Age>

    </Person>

    </Friends>

    Do you see that there is a root elements Friends Friends surrounds one or more Persons. While each Person has a Name and a Age.

    Lets say you have a Windows Application to store friends data. If you want to "load" your friends data your program would run thorugh this xml file and get the content out of each node.

    If you want to add a Friend using your software, the application must add a new Person node an voila!

    Please note that the Xml above is not fully complete. You should add the xml version etc. at the head. See .Net Classes XMLReader ... there are also many more in MSDN docu

    bye


  • Danny Tykon

    how can i use it with vbasic 2005

    an examle u can give me

    Thanks



  • McCloud

    This creates a xml document with the XmlDocument class and saves it to disk.

    Dim xmlDoc As XmlDocument
    Dim xmlElement As
    XmlElement
    Dim xmlAttribute As
    XmlAttribute

    ' New document
    xmlDoc = New XmlDocument()

    ' Create and add root element
    xmlElement = xmlDoc.CreateElement("Friends"
    )
    xmlDoc.AppendChild(xmlElement)

    ' Create a person element with a name attribute
    xmlElement = xmlDoc.CreateElement("Person"
    )
    xmlAttribute = xmlDoc.CreateAttribute(
    "name"
    )
    xmlAttribute.Value =
    "Andreas"
    xmlElement.Attributes.Append(xmlAttribute)

    ' Find the root element and add the Person element to that node
    xmlDoc.SelectSingleNode("/Friends"
    ).AppendChild(xmlElement)

    ' Save it to disk for examination
    xmlDoc.Save("c:\test.xml")



  • whats xml?