[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    Re: Validation Errors.
From:       "Jacob Danner" <jacob.danner () gmail ! com>
Date:       2007-06-27 14:57:41
Message-ID: bb04eb0a0706270757k6bc84369q1bc3439574e15e01 () mail ! gmail ! com
[Download RAW message or body]

This is really more of a question for the user group so including that
list with this email.

To get error information on the validation errors you need to use an
XmlOptions with an errorListener set.
I think this is covered in the documentation, but just in case here is
a snippet of how you might do this.

List err = new LinkedList();
XmlOptions xo = XmlOptions().setErrorListener(err);
XmlObject.validate(xo);

The  err object  will now be populated if any valdation errors occured
then you can cast the list item  to an XmlError and get the same
information you saw using validate.cmd.

-Jacob Danner


On 6/27/07, baisa, darwin <darwin.baisa@ips.invensys.com> wrote:
> Can any one help me to get Validation errors when we validate a node or
> file? The method validate() is giving whether the node is valid or not.
> But I am unable to get the validation errors. When I validate a XML file
> against a XSD using "validate.cmd" its giving detailed list errors. Is
> there any way in API to get these lists of errors?
>
>
>
> Regards,
>
> Darwin Baisa
>
>
>
>
>
>
> Confidentiality Notice:
> The information contained in this electronic message and any attachment(s)
> to this message are intended for the exclusive use of the recipient(s) and
> may contain confidential, privileged or proprietary information. If you are
> not the intended recipient, please notify the sender immediately, delete all
> copies of this message and any attachment(s). Any other use of the E-Mail by
> you is prohibited.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic