I'm having trouble finding a way to navigate to a certain element when
the error pertains to a missing attribute:
Something and somethingElse are attributes of nextElement. The
attribute 'somethingElse' has a restriction that it is required.
When somethingElse is not populated, the XmlValidationError object
cursor is pointed to the topElement.
<topElement xmlns="top">
<nextElement row="1" something="foo" somethingElse="bar"/>
<nextElement row="2" something="foo" />
<nextElement row="3" something="foo" somethingElse="bar"/>
</ topElement >
For errors without required restrictions, I can use
error.getCursorLocation().getDomNode().getAttributes().getNamedItem("row
").getNodeValue();
but when an error occurs at the Parent level, I cannot find a way to
know which row the error occurred in.
getFirstChild brings me to the first 'nextElement' getLastChild brings
me to the last 'nextElement'. How do I know which 'nextElement' had the
error?
Can anyone point me in the right direction for this?
Thanks,
Robert Costello