473,322 Members | 1,778 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,322 software developers and data experts.

Question about Xerces ????

hi, i have downloaded the latest version 2.4 of Xerces, and unziped it, i
end up with a diectory hierarchy like this
c:\xerces-2_4_0\XercesImpl.jar
c:\xerces-2_4_0\XercesSamples.jar
c:\xerces-2_4_0\xml-apis.jar
c:\xerces-2_4_0\xmlParserAPIS.jar
c:\xerces-2_4_0\data
c:\xerces-2_4_0\docs
c:\xerces-2_4_0\samples
there is no bin directory, my question is :
i want to check the validity of an xml file say 'myfiche.xml' with its
appropriate dtd file say 'mydtd.dtd'
wihch class have i to use to do that at the dos command line ? is there
another way to do this outside the dos prompt ?

THANKS for your help
Jul 20 '05 #1
2 2689
In article <bd*********@news-reader4.wanadoo.fr>,
hi************@wanadoo.fr says...
hi, i have downloaded the latest version 2.4 of Xerces, and unziped it, i
end up with a diectory hierarchy like this
c:\xerces-2_4_0\XercesImpl.jar
c:\xerces-2_4_0\XercesSamples.jar
c:\xerces-2_4_0\xml-apis.jar
c:\xerces-2_4_0\xmlParserAPIS.jar
c:\xerces-2_4_0\data
c:\xerces-2_4_0\docs
c:\xerces-2_4_0\samples
there is no bin directory, my question is :
i want to check the validity of an xml file say 'myfiche.xml' with its
appropriate dtd file say 'mydtd.dtd'
wihch class have i to use to do that at the dos command line ? is there
another way to do this outside the dos prompt ?


I use the following batch file to validate documents with Xerces

---- cut ----
@echo off

set CLASSPATH=d:\misc\xerces-2_3_0\xmlParserAPIs.jar
set CLASSPATH=%CLASSPATH%;d:\misc\xerces-2_3_0\xercesImpl.jar
set CLASSPATH=%CLASSPATH%;d:\misc\xerces-2_3_0\xercesSamples.jar

java sax.Counter -n -np -v -s -f %1
---- cut ----

The "-v" option turns on validation. The sax.Counter program is a sample
program that just prints out a count of the elements in a document.
However, with "-v" it also prints out error messages if the document is
invalid.

Hope this helps.

Peter
Jul 20 '05 #2
I do essentially the same as P.C. Chapin but I have added to sax.Counter some
code to check validity with respect to a given XML Schema (which not necessarily
the one indicated in the XML instance); see code here:
http://jmvanel.free.fr/xsd/Counter.java
http://jmvanel.free.fr/xsd/valid-sitemap.txt

However the future standard way to do that is with DOM 3 API's. But these are
not currently build by default in Xerces, although the code is here. I
investigete this currently.

Bekkali Hicham wrote:
hi, i have downloaded the latest version 2.4 of Xerces, and unziped it, i
end up with a diectory hierarchy like this .... there is no bin directory, my question is :
i want to check the validity of an xml file say 'myfiche.xml' with its
appropriate dtd file say 'mydtd.dtd'
wihch class have i to use to do that at the dos command line ? is there
another way to do this outside the dos prompt ?


Jul 20 '05 #3

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

Similar topics

1
by: Stu | last post by:
I am trying to build the xerces shared library with 2.3.0 version of their source code on an AIX 5.1 32 bit machine with the following version of the g++ compiler /usr/local/bin/g++ -v Reading...
0
by: Waseem | last post by:
Hi I have looked and tried everything and i still cant sort this out i have no idea why this wont work I am using Xerces Perl on Windows and Debian to try this and it wont work on both of...
0
by: Jim Phelps | last post by:
After having memory leak issues with Xerces-c 2.3.0 for Solaris 2.7 for CC 6.2 I have decided to update to at least 2.4. I have downloaded the binary tarball and have installed it on my...
0
by: Dale Gerdemann | last post by:
I've been trying to use DOM level 3 with xerces-2_6_2. There's a sample called samples/DOM3.java, but I've had trouble with compilation. I've downloaded Xerces-J-bin.2.6.2 and...
2
by: kzawah | last post by:
Hi, I am trying to quickly use xerces to parse some simple config files. I have used SAX a bit before but this is my first day working with DOM. Ive looked at the docs, and downloaded some...
18
by: jacksu | last post by:
I have a simple program to run xpath with xerces 1_2_7 XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); XPathExpression xp = xPath.compile(strXpr);...
2
by: Vlad Zorinov | last post by:
I'm getting the following error after a couple of months of XML processing, using Xerces 2.0.0 in an apache tomcat. Does anyone have any ideas what this problem may be or what I should do to solve...
9
by: mstilli | last post by:
Hi, I am trying to use schema for server side validation using xerces to catch the validation errors. validating this XML: <Content4> <textarea13></textarea13>...
3
by: omgponies | last post by:
Hi, I'm currently looking into AurigaDoc (aurigadoc.sourceforge.net) and it seems like this documentation software is poorly documented itself :) The program can create various output formats...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.