help with xpath in xml with references

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

help with xpath in xml with references

Post by yacahuma »

How do I access nodes in an xml that uses references? the href confuse the hek out of me. I know I cannot search for the numbers , since they are temporary, but how to I get to the end of the tree?

Code: Select all

 
    <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:OutSubscriberDetailsInfo" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://io.datainfo.APILink.amdocs">
            <mBan xsi:type="xsd:int">688685149</mBan>
            <mSubscriberNo xsi:type="ns3:SimpleChar" xmlns:ns3="http://awsi.amdocs.com">7873911055</mSubscriberNo>
            <mProductType href="#id1" />
            <mSubscriberStatusInfo href="#id2" />
            <mReasonCode xsi:type="ns4:SimpleChar" xmlns:ns4="http://awsi.amdocs.com">WRL</mReasonCode>
            <mUserNameInfo href="#id3" />
            <mUserAddressInfo href="#id4" />
            <mSocListInfo soapenc:arrayType="ns2:SocInfo[3]" xsi:type="soapenc:Array">
                <mSocListInfo href="#id5" />
                <mSocListInfo href="#id6" />
                <mSocListInfo href="#id7" />
            </mSocListInfo>
            <mPricePlanListInfo href="#id8" />
            <mPromotionalPricePlanListInfo xsi:type="ns2:SocInfo" xsi:nil="true" />
            <mProductParamDataInfo xsi:type="ns5:ArrayOf_tns2_ProductParamDataInfo" xsi:nil="true" xmlns:ns5="http://ws.interfaces.sessions.APILink.amdocs" />
            <mOutEquipmentInfo soapenc:arrayType="ns2:OutEquipmentInfo[2]" xsi:type="soapenc:Array">
                <mOutEquipmentInfo href="#id9" />
                <mOutEquipmentInfo href="#id10" />
            </mOutEquipmentInfo>
            <mSubscriberType href="#id11" />
            <mUnlistedInd href="#id12" />
        </multiRef>
 
        <multiRef id="id12" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns6:char" xmlns:ns6="http://awsi.amdocs.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
            <SimpleChar id="id12" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">N</SimpleChar>
        </multiRef>
 
Post Reply