Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

xml id

 
kahkean chor
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can i create a xml document without id?

is this correct?

<?xml version="1.0"?>
<cookies> <- root
<rmbme> <-name
<id>asdasd</id> <-element
<pw>asdsd</pw>
</rmbme>
</cookies>
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can have an element named "id" if you like. There are very few restrictions on elements names in XML, the main one being that they can't start with the string "xml". And you can have documents which don't contain any elements named "id" as well. If you've ever seen any other XML documents then chances are that you have seen a document without any such element.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic