1

我目前正在使用 xmlserialiser 输出如下内容

<Node1>
   <Child2 attr1="abc">
   <Child3 attr2="xyz">
<Node1>

我有一个这样的字符串:

String stringAttribute = "testAttribute='testAttributeValue'";

有没有办法使用 xmlserialiser 将字符串插入节点,例如

<Node1>
   <Child2 attr1="abc" testAttribute='testAttributeValue'>
   <Child3 attr2="xyz">
<Node1>

谢谢

标记

4

0 回答 0