Hi Gopal,
the formulation of my problem was not clear enough.
My question is :
I have a DTD (I have its URL) and I want to validate XML documents(regarding
this
particular DTD) THAT DO NOT contain any <!DOCTYPE>.
How can I do that ?
A great thanks in advance
Dominique
-----Message d'origine-----
De : Gopal Sharma [mailto:[EMAIL PROTECTED]
Envoy� : mercredi 19 juin 2002 14:11
� : [EMAIL PROTECTED]; [EMAIL PROTECTED]
Objet : Re: problem with DTD
Hi Sauquet,
You need not to do anything extra, just create a parser instance and use
parse() on that, if you don't require to validate w/ DTD. In case,
you need to validate it, use
<!DOCTYPE (roottag) [PUBLIC|SYSTEM] "..location of external dtd file" >
in your instance file and turn the validation (dtd) property ON.
It will be good to see Xerces *Samples* to know more about it.
Thanks
- Gopal
PS: BTW, It's not clear whether you need separate parse or one parse to
parse all XML instance documents.
Sauquet Dominique wrote:-
|
| Hi
|
| I want to parse several XML Documents with a DOM Parser to get DOM tree
| representations for my documents.
| My DTD is in an external file. It is the same for all the documents.
| The Documents do not contain the DTD !!
|
| How can I do ?
| I am not sure that I have understood this FAQ.
|
|
| How do I more efficiently parse several documents sharing a common
| DTD?
|
| DTDs are not currently cached by the parser. The common DTD, since
| it is specified in each XML document, will be re-parsed once for each
| document.
|
| However, there are things that you can do now, to make the process of
| reading DTD's more efficient:
|
| * keep your DTD and DTD references local
| * use internal DTD subsets, if possible
| * load files from server to local client before parsing
| * Cache document files into a local client cache. You should do an
| HTTP header request to check whether the document has changed, before
| accessing it over the network.
| * Do not reference an external DTD or internal DTD subset at all. In
| this case, no DTD will be read.
| * Use a custom EntityResolver and keep common DTDs in a memory buffer.
|
|
|
| Could you send me the corresponding example or any other example ?
| Thanks a lot
| Dominique
|
|
|
| > Dominique Sauquet
| > Direction des Moyens Informatiques
| > Tel : 01 46 84 13 12
| > <mailto:[EMAIL PROTECTED]>
| >
| > Prosodie
| > 150, rue Galli�ni
| > 92100 Boulogne
| > <http://www.prosodie.com/>
| >
| >
| >
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
|
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]