def xmlRecords = new XmlParser().parseText(peopleString)
// println xmlRecords.person.subject_datas
println "123"
def datas = xmlRecords.person.subject_datas
def newNode = new Node(datas, 'subject_data')
def newSubNode = new Node(newNode, "subject_field_id", ["type", "integer"], "123max offer")
def newSubNode1 = new Node(newNode, "value", "1000")
def newNode2 = new Node(datas,"subject_data")
def newSubNode2 = new Node(newNode, "subject_field_id", ["type", "integer"], "123application Status")
def newSubNode21 = new Node(newNode, "value", "APPLIED")
大家好,
当我尝试更新xml响应时,我遇到了问题。
我正在使用parseText将xmlstring转换为node。然后使用constructer创建一个Node obj。新节点(NodeList,Object(name))
我对应该使用Object的名称感到困惑。当我把String放在这里时,我找不到匹配的构造函数:groovy.util.Node(groovy.util.NodeList,java.lang.String)。我需要将String转换为Object吗? ?_?