You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Ni...@sercel.fr on 2002/03/04 16:14:20 UTC

Réf. : Help in validating.

I had the same question and I had no answer... I would appreciate too to get the name of the element just to get its properties in
the schema to alert the user and to remember to him the characteristics of the data.



                                                                                                                                                         
                    "Ragunath Marudhachalam"                                                                                                             
                    <rmarudhachalam@circuitv        Pour :  <xe...@xml.apache.org>                                                               
                    ision.com>                      cc :                                                                                                 
                                                    Objet :      Help in validating.                                                                     
                    03/04/2002 03:58 PM                                                                                                                  
                    Veuillez répondre à                                                                                                                  
                    xerces-j-user                                                                                                                        
                                                                                                                                                         
                                                                                                                                                         




Hi All,

I'm using xerces to validate my xml document with schema. I'm setting
ErrorHandler and i;m able to validate. When i get a exception, i'm able to
get the error message and the line number. Even though it gives me the
element name in the error message, is there any way i can get the element
name alone where the error has occured. I mean just like the line number, i
would like to get the element name.

Your help in this is highly appreciated!!!!

Thanks

Ragu
CircuitVision



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


RE: Réf. : Help in validating.

Posted by Dave Flanagan <da...@trainingetc.com>.
You state that it gives you the element name in the error message
Though this is not always the case.
For example if the element has an attribute and
it is the attribute that is invalid according to the schema
the error message is entirely different.

You may want to consider setting a flag to hold the value of
an element name every time the parser comes across the start
of an element by over-riding the startElement() method from
the ContentHandler interface.

Each time a new  start element is found the flag could then
be made to reference the new start element.

Within the errorHandler you then have access to name of the element
referenced by the flag.

Hope this helps

Dave Flanagan

At 10:21 AM 3/4/02, you wrote:
>ohhhh!!!!!!!!!!!! sandy, elena or someone, come for our
>rescue!!!!!!!!!!!!!!!!!!!
>
>Ragu
>CircuitVision
>
>
>
>-----Original Message-----
>From: Nicolas.GOLOUBENKO@sercel.fr [mailto:Nicolas.GOLOUBENKO@sercel.fr]
>Sent: Monday, March 04, 2002 10:14 AM
>To: xerces-j-user@xml.apache.org
>Subject: Réf. : Help in validating.
>
>
>
>I had the same question and I had no answer... I would appreciate too to get
>the name of the element just to get its properties in
>the schema to alert the user and to remember to him the characteristics of
>the data.
>
>
>
>
>                     "Ragunath Marudhachalam"
>                     <rmarudhachalam@circuitv        Pour :
><xe...@xml.apache.org>
>                     ision.com>                      cc :
>                                                     Objet :      Help in
>validating.
>                     03/04/2002 03:58 PM
>                     Veuillez répondre à
>                     xerces-j-user
>
>
>
>
>
>
>Hi All,
>
>I'm using xerces to validate my xml document with schema. I'm setting
>ErrorHandler and i;m able to validate. When i get a exception, i'm able to
>get the error message and the line number. Even though it gives me the
>element name in the error message, is there any way i can get the element
>name alone where the error has occured. I mean just like the line number, i
>would like to get the element name.
>
>Your help in this is highly appreciated!!!!
>
>Thanks
>
>Ragu
>CircuitVision
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-j-user-help@xml.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-j-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


RE: Réf. : Help in validating.

Posted by Ragunath Marudhachalam <rm...@circuitvision.com>.
ohhhh!!!!!!!!!!!! sandy, elena or someone, come for our
rescue!!!!!!!!!!!!!!!!!!!

Ragu
CircuitVision



-----Original Message-----
From: Nicolas.GOLOUBENKO@sercel.fr [mailto:Nicolas.GOLOUBENKO@sercel.fr]
Sent: Monday, March 04, 2002 10:14 AM
To: xerces-j-user@xml.apache.org
Subject: Réf. : Help in validating.



I had the same question and I had no answer... I would appreciate too to get
the name of the element just to get its properties in
the schema to alert the user and to remember to him the characteristics of
the data.




                    "Ragunath Marudhachalam"
                    <rmarudhachalam@circuitv        Pour :
<xe...@xml.apache.org>
                    ision.com>                      cc :
                                                    Objet :      Help in
validating.
                    03/04/2002 03:58 PM
                    Veuillez répondre à
                    xerces-j-user






Hi All,

I'm using xerces to validate my xml document with schema. I'm setting
ErrorHandler and i;m able to validate. When i get a exception, i'm able to
get the error message and the line number. Even though it gives me the
element name in the error message, is there any way i can get the element
name alone where the error has occured. I mean just like the line number, i
would like to get the element name.

Your help in this is highly appreciated!!!!

Thanks

Ragu
CircuitVision



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org