Results 1 to 5 of 5

Thread: What is an XML Element?

  1. #1
    Join Date
    Aug 2006
    Posts
    227

    What is an XML Element?

    I have recently started with an XML programming language. I came to know that Extensible Markup Language (XML) is a standard metalanguage for defining markup languages that is based on Standard Generalized Markup Language. Also explain me what does the XML attribute means.? The big question for me is What is an XML Element? Please help me by providing proper information.!!
    I do to dead flowers what people at morgues do to dead people. Suck all the moisture out, dip them in plastic, paint them up pretty and put them in a nice frame.

  2. #2
    Join Date
    Nov 2008
    Posts
    996

    Re: What is an XML Element?

    XML is a markup language that is used to store data in a self-explanatory manner. Making the data "self-explanatory" comes about by containing information in elements. An XML element is everything from the element's start tag to the element's end tag. An element can contain other elements, simple text or a mixture of both. A tag is just a generic name for a <element>. An opening tag looks like <element>, while a closing tag has a slash that is placed before the element's name: </element>. Hope that you got the concept of elements that are used in XML.

  3. #3
    Join Date
    Nov 2008
    Posts
    1,192

    Re: What is an XML Element?

    Elements can also have number of attributes. I am providing you with an example so that you can understand it more easily.
    Code:
    <cricket>
      <player category="INDIA">
        <name>Sachin Tendulkar</name>
        <nature>Batsman</nature>
        <age>33</age>    
      </player>
      <cricket>
      <player category="WEST INDIES">
        <name>Brian Lara</name>
        <nature>Batsman</nature>
        <age>31</age>    
      </player>
    </cricket>

  4. #4
    Join Date
    Mar 2008
    Posts
    349

    Re: What is an XML Element?

    There are some rules that you have to follow while using the XML. The following are the Naming Rules of XML :
    • Names cannot start with a number or punctuation character.
    • Names cannot start with the letters xml (or XML, or Xml, etc).
    • Names can contain letters, numbers, and other characters.
    • Names cannot contain spaces.

    You can use any name in XML, there are no words that are reserved.

  5. #5
    Join Date
    Mar 2008
    Posts
    672

    Re: What is an XML Element?

    XML elements can be extended to carry more information.

    You can have a look at the following XML example:
    HTML Code:
    <message>
    <to>Airo</to>
    <from>Watery</from>
    <body>Lets Have Fun Tomorrow!</body>
    </message>

Similar Threads

  1. Replies: 1
    Last Post: 10-05-2012, 11:55 AM
  2. Replies: 5
    Last Post: 18-06-2011, 07:39 AM
  3. How to know whether I am on first element or not in c#?
    By Constantinee in forum Software Development
    Replies: 5
    Last Post: 22-02-2010, 09:58 PM
  4. Get nth element of a Map
    By Gunner 1 in forum Software Development
    Replies: 5
    Last Post: 10-02-2010, 12:25 AM
  5. Iterate a sub-element
    By Vodka in forum Software Development
    Replies: 5
    Last Post: 05-02-2010, 12:23 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,798,546.86968 seconds with 16 queries