Guess I answered my own question.  You can subclass DOMParser, adding
code to the StartDocument and StartElement methods to create a UserData
value for each element that contains location information.  I found this
in the example program DOMAddLines.java.


--- Wayne Johnson <[EMAIL PROTECTED]> wrote:
> I'm using xerces-j to parse a large configuration file and am using the
> DOMParser.  
> 
> I've got a .xsd file set up for verifying the XML, but there is further
> error checking that I have to do while processing the file.
> 
> How can I generate an error message that can refer back to the original
> xml file.  Something like "undefined topic defined on line 9232".
> 
> Do I need to go back and use the SAXParser?  I was hoping to use DOM
> because its easier processing imbedded elements (no need for state
> tables, etc.).
> 
> Thanks in advance.
> 
> =====
> ---
> Wayne Johnson,             | There are two kinds of people: Those 
> 3943 Penn Ave. N.          | who say to God, "Thy will be done," 
> Minneapolis, MN 55412-1908 | and those to whom God says, "All right, 
> (612) 522-7003             | then,  have it your way." --C.S. Lewis
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Search - Find what you�re looking for faster
> http://search.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


=====
---
Wayne Johnson,             | There are two kinds of people: Those 
3943 Penn Ave. N.          | who say to God, "Thy will be done," 
Minneapolis, MN 55412-1908 | and those to whom God says, "All right, 
(612) 522-7003             | then,  have it your way." --C.S. Lewis

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster
http://search.yahoo.com

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

Reply via email to