xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Oliver Monz <...@ftk.de>
Subject SAX parser should parse xml-document thats a string value ..?
Date Tue, 24 Oct 2000 15:11:58 GMT
Hello!

I hope anybody can help me. I used the xalan-Sample PureSAX
for testing. The sample uses files for input of xml- and xsl-files.
But I am looking for a method to read the xml/xsl-data directly
from a String or StringBuffer e.g. like:


SAXParser saxparser = new SAXParser();

String xmldata = "<?xml version=\"1.0\"?><CATALOG><BOOK><TITLE>A Certain
Justice</TITLE><AUTHOR>P.D.
James</AUTHOR><YEAR-PUBLISHED>1998</YEAR-PUBLISHED><ISBN>0375401091</ISBN></BOOK></CATALOG>";

saxparser.parse(xmldata);


But thats does not run, because of parse want to open the file named
"<?xml version ... " and the file is not existend. 

Now I am looking for method that allows me to read the data direct
from a stringvalue.

Can anybody help me?


thanx.

peter monz
Mime
View raw message