cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Delahunty" <bdelahu...@tssg.org>
Subject Re: XML Parsing + SAX
Date Fri, 20 Jun 2003 11:09:58 GMT
Thanks. That worked perfectly :-D


----- Original Message ----- 
From: "Merenidis, Grigorios" <Grigorios.Merenidis@Dresdner-Bank.com>
To: <cocoon-users@xml.apache.org>
Sent: Wednesday, June 18, 2003 4:13 PM
Subject: AW: XML Parsing + SAX


Hi!

try this:

                XMLReader parser =
XMLReaderFactory.createXMLReader(org.apache.xerces.parsers.SAXParser);
                ContentHandler c1 = new ContentHandler();
                ErrorHandler e1 = new ErrorHandler();
                parser.setContentHandler(c1);
                parser.setErrorHandler(e1);
                parser.parse(new InputSource(new StringReader("your special
String!!")));

cheers

gregori

-----Urspr√ľngliche Nachricht-----
Von: Brian Delahunty [mailto:bdelahunty@tssg.org]
Gesendet am: Mittwoch, 18. Juni 2003 17:11
An: cocoon-users@xml.apache.org
Betreff: XML Parsing + SAX

Hey,

I have a String that contains an XML file [not a URL/URI that points to an
XML file but the actual XML itself].

I'm tying to use this string in a custom generator to produce sa exents. I'm
using this code so far:

XMLReader xmlr = XMLReaderFactory.createXMLReader();
xmlr.setContentHandler(this.contentHandler);
xmlr.parse( <don't know what goes here> );

I can't get parse to work with a String.

Any ideas?

Brian



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message