• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

LSParser - DOMErrorHandler - DOMError and getRelatedNode()

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

i'm using a LSParser-Instance to parse a XML-File and validate it against an XML-Schema.

That works fine so far.
The Validationerrors are reported to an Error-Listener as org.w3c.dom.DOMError

DOMError provides the Method "getLocation()", which return an org.w3c.dom.DOMLocator object which provides a "getRelatedNode()" Method.

I supposed that this method will tell me at which node in the Source-Document the error occured. Unfortunately it returnes null.

Is it possible to get the related Node in any way?

My code looks like this:



[ May 21, 2007: Message edited by: Michael Mest ]
[ May 21, 2007: Message edited by: Michael Mest ]
 
Michael Mest
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm really new to Java+XM.
Is it possible that i'm using the wrong parser or anything like that?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic