[Home] [By Thread] [By Date] [Recent Entries]

  • From: Kay Michael <Michael.Kay@i...>
  • To: "'Alaoui Karim'" <alaouik@u...>, xml-dev@x...
  • Date: Tue, 13 Jun 2000 10:35:01 +0100

> Is it possible to use an XML Parser to parse  an XML text 
> contained in a String or a StringBuffer ?

yes, if the parser supports the SAX interface: take a look at the SAX
InputSource object. You actually need to supply a StringReader but that's
trivial. The one thing to be careful of is that it's a good idea to supply a
SystemId as well, to act as a base URL for resolving any relative URL's
within the document.

Mike Kay

***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

  • Follow-Ups:
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member