XML String parsing
Hi all,
Im new in Java, I need to read and parse content of XML file from client via Internet. I used HTML (MULTIPART/FORM-DATA) access to get XML file content to String and now I need to parse it, but DOMParser has not parse method with String parameter, respectively wants only file name. I do not want to save the file in my filesystem. So how to solve it - any links, example, ... ?
Many thanks in advance !!
LR
[440 byte] By [
lubkaa] at [2007-9-28 19:22:46]

it goes a little something like this....
public class DocumentFactory {
private static SAXBuilder builder = new SAXBuilder();
private static Document document = null;
private Element rootElement;
private List childElements;
public static Document stringToDocument(String xmlString) {
try {
DocumentFactory.document = DocumentFactory.builder.build(new InputSource(new StringReader(xmlString)));
} catch (Exception e) {
e.printStackTrace();
}
return DocumentFactory.document;
}
}