File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes xml id Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "xml id" Watch "xml id" New topic

xml id

kahkean chor
Ranch Hand

Joined: Jan 26, 2013
Posts: 63
can i create a xml document without id?

is this correct?

<?xml version="1.0"?>
<cookies> <- root
<rmbme> <-name
<id>asdasd</id> <-element
Paul Clapham

Joined: Oct 14, 2005
Posts: 19359

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.
Have you tried LearnNowOnline?
subject: xml id