You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by kamakshi <ka...@hcl.in> on 2006/11/14 10:18:11 UTC

i want to validate an xml against a xsd specified.

Hi frnds,
I am using SAXPrint inorder to print the xml file.
For executing i use the command

./SAXPrint -v=auto filename.xml
In this case no validation is taking place, just the file is getting
printed, even when the xml does not comply with the xsd file given in
schemalocation.
I have attached the xml and xsd file that i used for refernce.

http://www.nabble.com/file/4162/ExpReport.xml ExpReport.xml 
http://www.nabble.com/file/4163/ExpReport.xsd ExpReport.xsd 

If this way of xmal validation is not possible, can any one suggest me an
alternative

Thank u.
-- 
View this message in context: http://www.nabble.com/i-want-to-validate-an-xml-against-a-xsd-specified.-tf2628180.html#a7333942
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


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


Re: i want to validate an xml against a xsd specified.

Posted by kamakshi <ka...@hcl.in>.
Hi,
I tried execution as u said, but i am not getting any error, even if the xml
values are not according to the xsd.
Can you just check my xml and tell me whether the way i have specified the
location of the xsd is correct.
Else is there any other function that i can use for validating the xml
against xsd?

Thank You
...............................................................................................................................................................

Alberto Massari wrote:
> 
> Hi,
> in order to enable XMLSchema validation, you need to turn on schems 
> and namespace processing:
> 
> ./SAXPrint -v=auto -s -n filename.xml
> 
> You can also add the -f option that enables the full schema 
> constraints checking.
> 
> Alberto
> 
> At 01.18 14/11/2006 -0800, kamakshi wrote:
> 
>>Hi frnds,
>>I am using SAXPrint inorder to print the xml file.
>>For executing i use the command
>>
>>./SAXPrint -v=auto filename.xml
>>In this case no validation is taking place, just the file is getting
>>printed, even when the xml does not comply with the xsd file given in
>>schemalocation.
>>I have attached the xml and xsd file that i used for refernce.
>>
>>http://www.nabble.com/file/4162/ExpReport.xml ExpReport.xml
>>http://www.nabble.com/file/4163/ExpReport.xsd ExpReport.xsd
>>
>>If this way of xmal validation is not possible, can any one suggest me an
>>alternative
>>
>>Thank u.
>>--
>>View this message in context: 
>>http://www.nabble.com/i-want-to-validate-an-xml-against-a-xsd-specified.-tf2628180.html#a7333942
>>Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>>For additional commands, e-mail: c-dev-help@xerces.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/i-want-to-validate-an-xml-against-a-xsd-specified.-tf2628180.html#a7334215
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


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


Re: i want to validate an xml against a xsd specified.

Posted by Alberto Massari <am...@datadirect.com>.
Hi,
in order to enable XMLSchema validation, you need to turn on schems 
and namespace processing:

./SAXPrint -v=auto -s -n filename.xml

You can also add the -f option that enables the full schema 
constraints checking.

Alberto

At 01.18 14/11/2006 -0800, kamakshi wrote:

>Hi frnds,
>I am using SAXPrint inorder to print the xml file.
>For executing i use the command
>
>./SAXPrint -v=auto filename.xml
>In this case no validation is taking place, just the file is getting
>printed, even when the xml does not comply with the xsd file given in
>schemalocation.
>I have attached the xml and xsd file that i used for refernce.
>
>http://www.nabble.com/file/4162/ExpReport.xml ExpReport.xml
>http://www.nabble.com/file/4163/ExpReport.xsd ExpReport.xsd
>
>If this way of xmal validation is not possible, can any one suggest me an
>alternative
>
>Thank u.
>--
>View this message in context: 
>http://www.nabble.com/i-want-to-validate-an-xml-against-a-xsd-specified.-tf2628180.html#a7333942
>Sent from the Xerces - C - Dev mailing list archive at Nabble.com.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org


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