Hi,
I'm not sure if this is where I
should be asking this.
I'm writing a custom generator that
needs to just return an XML document that's contained within a String. Now in the past I have used
code like this [Simple Hello-World]:
public class SMSGenerator extends AbstractGenerator { AttributesImpl emptyAttr = new AttributesImpl(); public void generate() throws SAXException { contentHandler.startDocument(); contentHandler.startElement("", "abc", "def", emptyAttr); contentHandler.characters("Hello World".toCharArray(), 0, "Hello World".length()); contentHandler.endElement("","abc", "def"); contentHandler.endDocument(); } } I now have the XML file in a
String and I need this to be "returned" by the generator. I was just wondering
if anybody knew how to do that without going through the String, breaking it
into "Elements" and "characters"
Thanks in advance
Brian
|
- Re: Custom Generators - SAX Brian Delahunty
- Re: Custom Generators - SAX Holger Dewes