W
Wendy S
I have a String of XML, say:
String data = "<person><key>012345</key><preferredName>Amy
Johnson</preferredName></person>"
I'm trying to feed it to Digester's parse
method(http://jakarta.apache.org/commons/digester/api/org/apache/commons/dig
ester/Digester.html) and my choices are:
parse(java.io.File file)
parse(org.xml.sax.InputSource input)
parse(java.io.InputStream input)
parse(java.io.Reader reader)
parse(java.lang.String uri)
I'm still wandering around the API. So far, I think I will have to take my
String, turn it into a byte[], make a ByteArrayInputStream and then
(finally) call the third option above, parse(java.io.InputStream input).
Is there a better way to do it?
Thanks in advance,
String data = "<person><key>012345</key><preferredName>Amy
Johnson</preferredName></person>"
I'm trying to feed it to Digester's parse
method(http://jakarta.apache.org/commons/digester/api/org/apache/commons/dig
ester/Digester.html) and my choices are:
parse(java.io.File file)
parse(org.xml.sax.InputSource input)
parse(java.io.InputStream input)
parse(java.io.Reader reader)
parse(java.lang.String uri)
I'm still wandering around the API. So far, I think I will have to take my
String, turn it into a byte[], make a ByteArrayInputStream and then
(finally) call the third option above, parse(java.io.InputStream input).
Is there a better way to do it?
Thanks in advance,