在使用SOAPElement添加子类,如下图:
生居的XML格式如下图:
要怎么才能生成字符成对出现,如下图:
好像改不了吧。 除非修改它的源码
addAttribute
SOAPElement addAttribute(Name name,
String value)
throws SOAPException
Adds an attribute with the specified name and value to this SOAPElement object.
Parameters:
name - a Name object with the name of the attribute
value - a String giving the value of the attribute
Returns:
the SOAPElement object into which the attribute was inserted
Throws:
SOAPException - if there is an error in creating the Attribute, or it is invalid to set an attribute with Name name on this SOAPElement.
See Also:
addAttribute(javax.xml.namespace.QName, String)
addTextNode
SOAPElement addTextNode(String text)
throws SOAPException
Creates a new Text object initialized with the given String and adds it to this SOAPElement object.
Parameters:
text - a String object with the textual content to be added
Returns:
the SOAPElement object into which the new Text object was inserted
Throws:
SOAPException - if there is an error in creating the new Text object or if it is not legal to attach it as a child to this SOAPElement