You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Swanson, Brion" <Br...@westgroup.com> on 2002/09/20 14:47:25 UTC

Using a String to validate XML

I apologize if this question has already been asked, but the archive appears
to be down for an upgrade (since yesterday).

Is there a way in Xerces to use a Java object, such as a StringBuffer or a
String, to validate an incoming XML document?  In other words, if I read in
a DTD or schema and preserve it in object form (cache it), can I tell Xerces
to look at this object when validating an XML document?  If so, how do I go
about doing that?

I know I can have Xerces parse a Java object using the InputSource(String s)
constructor (given I stringify the Java object and that string is
well-formed XML), but I have a need to do a similar Java object-based
validation instead of accessing an external file each and every time I need
to validate a parse.

The only documentation I've been able to find talks about setting the public
and system IDs, but I don't if and how to set the public/system ID to a Java
object.  My intuition tells me that I can't, but I wanted to ask those more
knowledgeable.

Thank you for your help in advance!

Cheers!
Brion

--------------
Brion Swanson - West Group / Rochester, NY
mailto:Brion.Swanson@westgroup.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org