XML parsers

M

Manu Stanley

I am trying to validate simple xml documents against a given/external
DTD. Can someone help me identify a method for the same if I wish I
could select a folder full of *.xml files and run the utility? Even a
parser that has the feature to check the form and validate a folder
full of *.xml files will do.

Thanks

Manusmriti.
 
?

=?ISO-8859-1?Q?J=FCrgen_Kahrs?=

Manu said:
I am trying to validate simple xml documents against a given/external
DTD. Can someone help me identify a method for the same if I wish I
could select a folder full of *.xml files and run the utility?

Tools like xmllint validate one file at a time.
If you want to validate several files, you should
invoke xmllint several times; once for each file.
 
P

Peter Flynn

Manu said:
I am trying to validate simple xml documents against a given/external
DTD. Can someone help me identify a method for the same if I wish I
could select a folder full of *.xml files and run the utility? Even a
parser that has the feature to check the form and validate a folder
full of *.xml files will do.

Download and install a standalone XML parser like nsgmls or rxp.
Then either write a script which feeds the filenames from the
directory to the parser one at a time, or use a command like

$ cd mydirectory
$ for f in *.xml; do rxp $f; done

If you're using a non-Unix-like system (eg Microsoft Windows) you can
either install a Unix-shell processor like Cygwin to do this, or there
may be some looping feature in DOS batch files which will do it.

///Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top