Hi Ajay,

There's no such property, however if you're using the PSVI DOM [1] you can
walk the tree and find where the errors are located by querying the
ItemPSVI [2] of each element and attribute node.

Thanks.

[1] http://xerces.apache.org/xerces2-j/faq-dom.html#faq-8
[2]
http://xerces.apache.org/xerces2-j/javadocs/xs/org/apache/xerces/xs/ItemPSVI.html

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

ajay bhadauria <abhadau...@yahoo.com> wrote on 08/21/2009 02:08:06 PM:

> Hi,
>
> When Xml validation fails against Schema for attribute node. Is
> there any way I can get the node which is in error. Validator Error
> message tells that it is attrinute or element node etc ...
>
> I wanted to know that is there any property or API by which I know
> that the errored Node is element Node or Attribute Node etc.
>
> Thanks in advance if someone Clarifies
>
> Thanks
> AB
>
> --- On Fri, 8/21/09, ajay bhadauria <abhadau...@yahoo.com> wrote:
>
> > From: ajay bhadauria <abhadau...@yahoo.com>
> > Subject: Attribute validation Error
> > To: j-users@xerces.apache.org
> > Date: Friday, August 21, 2009, 9:19 PM
> > Hi,
> >
> > I am validating xml instance against schema using java
> > Validator API with DOMsource. Now, Suppose, there is an
> > error in one of the attributes of the element.
> >
> > I am able to get the element node using
> > current-element-node property and the Validator is reporting
> > error that attribute (name of the attribute) is not allowed
> > in element. That is all good.
> >
> > Is there any way that Validator can tell that which
> > attribute has in error
> > though in the error message it tells that.
> >
> > Or I need to parse the error message to get the name of the
> > attribute ?
> >
> > Please recommend
> > Thanks
> > AB
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
> > For additional commands, e-mail: j-users-h...@xerces.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
> For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to