解决方案 »

  1.   

    RECORD 为第一个节点,然后下面的一直add下去
      

  2.   

    可以先将xml格式的字符串转换为xml,然后再操作。
    http://blog.csdn.net/arui_email/article/details/7703424
      

  3.   

    public static Element stringToElement(String strXML,String rootNode) throws SAXException, IOException
    {
    //给节点串加个唯一根节点
    String XMLString = "<"+rootNode+">"+strXML+"</"+rootNode+">";
    SAXBuilder sAXBuilder = new SAXBuilder();
    StringReader read = new StringReader(XMLString); 
    InputSource source = new InputSource(read);
    Element root = null;
    Document doc = null;
    try 
    {
    doc = sAXBuilder.build(source);
    // 获得根元素element
    root = doc.getRootElement(); 

    catch (JDOMException e) 
    {
    // TODO Auto-generated catch block
    e.printStackTrace();

    finally
    {
    read.close();
    }
    return (Element)root.clone();
    }