一,使用JDOM(这是我最常使用的一种技术)
1.字符串转Document对象
String xmlStr =
".....";
StringReader sr = newStringReader(xmlStr);
InputSource is = newInputSource(sr);
Document doc = ( newSAXBuilder()).build(is);
StringReader sr = newStringReader(xmlStr);
InputSource is = newInputSource(sr);
Document doc = ( newSAXBuilder()).build(is);