473,379 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

XML parsers

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.
Jul 20 '05 #1
2 1290
Manu Stanley wrote:
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.
Jul 20 '05 #2
Manu Stanley wrote:
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
--
"The cat in the box is both a wave and a particle"
-- Terry Pratchett, introducing quantum physics in _The Authentic Cat_
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Will Stuyvesant | last post by:
There seems to be no XML parser that can do validation in the Python Standard Libraries. And I am stuck with Python 2.1.1. until my web master upgrades (I use Python for CGI). I know pyXML has...
0
by: Magnus Lie Hetland | last post by:
I'm working on a project where I have to create parsers on the fly, based on input to my program. I think Spark seems like a good candidate for the parser generation part, but it seems very geared...
2
by: Thomas Guettler | last post by:
Hi! What are the difference between xml.parsers.expat and xml.sax? Up to now I used xml.sax.make_parser and subclass from ContentHandler. I think xml.sax.make_parser uses expat as default....
0
by: dagurp | last post by:
I have this code: import xml.parsers.expat parser = xml.parsers.expat.ParserCreate(encoding="UTF-8") text = unicode("<div>þórður</div>",'UTF-8') print parser.Parse(text,1) And this is what I...
1
by: bloon | last post by:
I know there are three most popular open-source XML parsers. They are expat, libxml, and Xerces. All three are cross-platform. Does anybody test these three parsers? Which one is the fastest when...
2
by: Rick | last post by:
Hi.. I've got some code I wrote in PHP that will generate an HTML page with embedded javascript which in turn creates a new argument string for the browser, but the xhtml parser in Firefox and...
2
by: Dale Strickland-Clark | last post by:
A few days ago there was a discussion about which XML parser to use with Python. However, the discussion didn't cover validating parsers, at least, not w3.org XML Schemas. I looked into all the...
2
by: dwelch91 | last post by:
Hi, c.l.p.'ers- I am having a problem with the import of xml.parsers.expat that has gotten me completely stumped. I have two programs, one a PyQt program and one a command line (text) program...
0
by: JosAH | last post by:
Greetings, welcome back at the sequel of the parsers article chapter. This part is dedicated to the ExpressionParser, the largest parser class for our little language. This class parses a...
0
by: JosAH | last post by:
Greetings, this week's article part discusses the parsers used for our little language. We will implement the parsers according to the grammar rules we defined in the second part of this...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.