pb9解析xml英文数字等字符就没问题,中文就解析不出来,是空的

用了网上找的例子,解析出英文数字等字符就没问题,中文就解析不出来,是空的,是什么原因呢,下面附上例子

//定义基本变量

PBDOM_Builder builder
PBDOM_Document doc
PBDOM_Element root, children[], element
string value

builder = Create PBDOM_BUILDER

//in_xml为要解析的xml字符串

//例如S0000

//要获取resultCode的值,进行下列操作即可获得

doc = builder.BuildFromString(in_xml)

// Get the root element of the document
root = doc.GetRootElement() // Get an array of all child elements
root.GetChildElements(children)
// Get only elements with a given name

//Response为xml字符串的根节点,即最外层节点
root.GetChildElements( "Response", children ) // Get the first element with a given name

string resultCode

//resultCode为子节点,通过GetText()函数即可获得子节点resultCode的值s0000

resultCode = root.GetChildElement( "resultCode" ).GetText()