我有这个 XML:
<?xml version="1.0" encoding="UTF-8"?>
<XML xmlns:r="#SchemaA2A">
<Schema xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes" name="SchemaA2A">
<ElementType name="ROOT" content="eltOnly" model="closed" order="many">
<AttributeType name="Response" dt:type="i4"/>
<AttributeType name="ErrorNumber" dt:type="i4"/>
<AttributeType name="ErrorDescription" dt:type="string"/>
<AttributeType name="ErrorDisplay" dt:type="boolean"/>
<attribute type="Response"/>
<attribute type="ErrorNumber"/>
<attribute type="ErrorDescription"/>
<attribute type="ErrorDisplay"/>
</ElementType>
<ElementType name="ROW" content="empty" model="closed">
<AttributeType name="Personid" dt:type="string"/>
<attribute type="Personid"/>
</ElementType>
</Schema>
<r:ROOT Response="1" ErrorNumber="0" ErrorDescription="" ErrorDisplay="1">
<r:ROW Personid="1077231296"/>
</r:ROOT>
</XML>
并且这两个都返回空值:
var person_id = (xmlObject \ "XML" \ "ROOT" \ "ROW" \ "@Personid").text
和
var person_id = (xmlObject \ "ROOT" \ "ROW" \ "@Personid").text
我做错了什么?