473,380 Members | 1,346 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,380 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 2692
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: 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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.