Hi,guys
I have a DataObject as below and it's Type is defined in two schema with
different targetNamespace.
Now I want to access the "cost" property of the DataObject.The code is
like that:
DataObject.get("deliord/cost");
It doesn't work. What's proper xpath expression I should use?
Please help. Thanks!
*DataObject:*
<dat:deliverGoods xmlns:dat="http://dataact.act.org"
xmlns:xsd="http://dataact.act.org/xsd">
<dat:deliord>
<xsd:cost>100</xsd:cost>
<xsd:id>101</xsd:id>
<xsd:address>buaa nmb g513</xsd:address>
<xsd:buyer>cai</xsd:buyer>
<xsd:goodname>The WS Haters Handbook</xsd:goodname>
</dat:deliord>
</dat:deliverGoods>
*Schema_1:*
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ax26="http://dataact.act.org/xsd"
targetNamespace="http://dataact.act.org">
<xs:import namespace="http://dataact.act.org/xsd" />
<xs:element name="deliverGoods">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="deliord" nillable="true"
type="ax26:DeliverOrder" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
*Schema_2:*
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://dataact.act.org/xsd">
<xs:complexType name="DeliverOrder">
<xs:sequence>
<xs:element minOccurs="0" name="address" nillable="true"
type="xs:string" />
<xs:element minOccurs="0" name="buyer" nillable="true"
type="xs:string" />
<xs:element minOccurs="0" name="cost" type="xs:double" />
<xs:element minOccurs="0" name="goodname" nillable="true"
type="xs:string" />
<xs:element minOccurs="0" name="id" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:schema>