Hi, > Do you think you could give me a little guidance into how to go about > creating this custom error method?
Sure I can. > I have seen some information in the mail archives about setting up an > error handler for a XercesDOMParser, but I am using a DOMBuilder to > parse my file. I do set my own DOMErrorHandler and override the > handleError() call. But that is where I get the DOMLocator that returns > the DOMText node that isn't useful to me. DOMBuilderImpl implements the XMLErrorHandler. Take a look at the error method. It calls getCurrentNode. I would suggest you implement your own one of these that does something a bit more complex. It should look at the error code coming in and decide if it should getCurrentNode, or perhaps the parent etc. This is still going to cause a problem with you child not being in the schema case as you will not know which child to select. If you cannot live with this then I think the easiest way is to add a new error method to XMLErrorHandler that takes a more information. Take a look at SGXMLScanner.cpp:1406. You could call your new error method with info that enable the implementation to select the correct node. Give us a shout if any of this is not clear. Gareth -- Gareth Reakes, Head of Product Development +44-1865-203192 DecisionSoft Limited http://www.decisionsoft.com XML Development and Services --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
