Through the xmlSerializer. Read (XML). The toString ();
Conversion results:
{
"@ nameCN" : "electric logging,"
"Step" : [
{
"signer" : {
"@ staffID" : "800706",
"@ nameCN" : ", "
"# cdata section -" :
}
},
{
"signer" : {
"@ staffID" : "090477",
"@ nameCN" : ", "
"# cdata section -" :
} }
]
},
{
"@ nameCN" : "energy conservation",
"Step" : [
{
"Signer" : [
{
"@ staffID" : "800608",
"@ nameCN" : ", "
"# cdata section -" :
},
{
"@ staffID" : "800808",
"@ nameCN" : ", "
"# cdata section -" :
}
]
},
{
"Signer" : [
{
"@ staffID" : "800602",
"@ nameCN" : ", "
"# cdata section -" :
},
{
"@ staffID" : "800803",
"@ nameCN" : ", "
"# cdata section -" :
}
]
}
]
}
CodePudding user response:
Result of the above marked in red is different, have more than one signer under step nodes, the output signer is an array,
Only one output signer signer node is not an array, how to when there is only one signer node output for an array
CodePudding user response:
Gaiyuan code? Couldn't think of any other measures epsilon=(' &western ` *))) ~
CodePudding user response: