OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: Parsing a String

[ Lists Home | Date Index | Thread Index ]
  • From: Kay Michael <Michael.Kay@icl.com>
  • To: "'Alaoui Karim'" <alaouik@usa.net>, xml-dev@xml.org
  • 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@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

  • Follow-Ups:



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS