473,790 Members | 3,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\XercesImp l.jar
c:\xerces-2_4_0\XercesSam ples.jar
c:\xerces-2_4_0\xml-apis.jar
c:\xerces-2_4_0\xmlParser APIS.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 2719
In article <bd*********@ne ws-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\XercesImp l.jar
c:\xerces-2_4_0\XercesSam ples.jar
c:\xerces-2_4_0\xml-apis.jar
c:\xerces-2_4_0\xmlParser APIS.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:\mi sc\xerces-2_3_0\xmlParser APIs.jar
set CLASSPATH=%CLAS SPATH%;d:\misc\ xerces-2_3_0\xercesImp l.jar
set CLASSPATH=%CLAS SPATH%;d:\misc\ xerces-2_3_0\xercesSam ples.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
11268
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 specs from /usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.1/specs Configured with: ../gcc-3.3.1/configure --disable-nls Thread model: aix gcc version 3.3.1
0
3091
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 them. Basically i am tryin to do simple tree transversale and get the node values out
0
1854
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 development server, which runs Solaris 2.8. I do use CC 6.2 for my compiler. I have reset all the environment variables in Korn shell that point to the Xerces distribution. When I try to compile the same piece of code that compiles fine under Xerces...
0
1824
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 beta2-dom3-Xerces-J-bin.2.6 and added the following paths to my CLASSPATH: ..../xerces-2_6_2/xercesImpl.jar: ..../xerces-2_6_2/dom3-xercesImpl.jar: ..../xerces-2_6_2/dom3-xml-apis.jar: ..../xerces-2_6_2/xmlParserAPIs.jar: ..../xerces-2_6_2/xercesSamples.jar:
2
1477
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 samples from the web, the web sample is creating an XML writer dom implementation with: pImplement = DOMImplementationRegistry::getDOMImplementation(XercesString("LS")); The xerces docs for the function say:...
18
7739
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); System.out.println(xp.evaluate(new InputSource(new FileInputStream("a.xml"))));
2
3410
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 it? cheers, Vlad The exception is... tv.ditg.sdl.ParsingException: tv.ditg.sdl.ParsingException:
9
3020
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> <binaryobject3></binaryobject3>
3
1743
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 using XSLT and a CSS if you write your document in a specific AurigaDoc XML syntax. As I'm pretty new to XML and the software commonly used to process it I wondered if somebody could tell me which part of the program actually does the XML to...
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9512
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10419
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9987
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7531
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6770
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4100
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3709
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2910
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.