Hi,

>Just out of curiosity, is there an equivalent to SAX locator
>(org.xml.sax.Locator) in the DOM API?

For line number/column number, no.  The DOM spec hides the document
details like line and column number on purpose.  There may be
implementation-specific extensions to correlate a DOM node with a
line/column number.  I think Xerces had one at some point.

For publicId/systemId, more or less yes: every DOM Document with a
specified doctype in the XML will have exactly one DocumentType object
associated with it.  Use Document#getDoctype to get it, then call
getPublicId and getSystemId.  Document#getDoctype will return null if
the XML file didn't specify a doctype.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to