From: siegfried <sie...@he...> - 2008-01-22 00:48:53
|
Andy, Thanks! What about the encoding argument? Can I specify null for the systemid, publicid, and basesystemid and encoding? Siegfried -----Original Message----- From: Andy Clark [mailto:an...@cy...] Sent: Monday, January 21, 2008 5:28 PM To: sie...@he... Cc: nek...@li... Subject: Re: [nekohtml-user] Wanted: Example to read from string instead of file sie...@he... wrote: > Can someone give me an example of parsing the contents of a string > instead of reading from a file? You need to wrap the string in a java.io.StringReader and then pass that into the XMLInputStream's constructor. This is the same as if you were parsing XML documents with Xerces. The publicId and systemId are only important for XML parsing when the parser needs to load an external entity. -AndyC |