XML in unix

Can you please tell for some freeware unix based command line XML parser/tool which will check whether a particular XML corresponds to its XSD or not.

please help immediately.........

man xmllint

this should help you a lot ! :slight_smile:

make sure the libxml version used in xmllint is 2.6.26

to check whether xml conforms to defined xsd's

thank you.
i got my answer:)

hi can anyone provide how to use xmllint tool?

its very important.

xmllint --noout --schema filename.xsd xmlfile

man xmllint for more options

Hi

If the version of unix does not have the --schema arguement, do we have any default location on unix from where it will pick the XSD file.

could you please post the output of

xmllint --version

?

hi
i got this

xmllint: using libxml version 20616
compiled with: DTDValid FTP HTTP HTML C14N Catalog XPath XPointer XInclude Iconv Unicode Regexps Automata Schemas

this in case of other server

xmllint: using libxml version 20504
compiled with: FTP HTTP HTML C14N Catalog DocBook XPath XPointer XInclude Iconv Unicode Regexps Automata Schemas

in case of old server i got this:-

xmllint: using libxml version 20504
compiled with: FTP HTTP HTML C14N Catalog DocBook XPath XPointer XInclude Iconv Unicode Regexps Automata Schemas

to check for xml's validation against xsd's

version should be

xmllint: using libxml version 20616

then only it would work !

hi

if we do not have this version then by any means can we validate the xml using xsd.
if yes then please let me know immediately

thanks for ur outputs.

As far as my knowledge you won't be able to validate against XSD's

that is the reason why 2.06.26 are available

with the previous version you would be able to validate only DTD's and not the schemas

thank you very much

you helped me a lot.:slight_smile:

while validating the XML against its XSD i am getting this error.

fails to validate in facet enumeration

kindly help