XML Element 相关方法

      Element l_o_MessageRoot = new Element("message");
      FlexUtils.buildFormHead(l_o_MessageRoot, "", "", "", "", l_str_ResourceContent);

      Element l_o_UserName = new Element("user-name").addContent(username);

      Element l_o_Passwd = new Element("user-passwd").addContent(password);

      Element l_o_Properties = new Element("parameters").addContent(l_o_UserName).addContent(l_o_Passwd);
      for (int i = 0; i < l_arry_LoginName.size(); ++i) {
        l_str_loginname = l_arry_LoginName.get(i).toString();
        l_str_loginvalue = l_arry_LoginValue.get(i).toString();
        Element l_o_Parameter = new Element(l_str_loginname).addContent(l_str_loginvalue);

        l_o_Properties.addContent(l_o_Parameter);
      }

      Element l_o_MessageData = new Element("data").addContent(l_o_Properties);

      l_o_MessageRoot.addContent(l_o_MessageData);
      document.setRootElement(l_o_MessageRoot);

你可能感兴趣的:(element)