Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

XPATH query help needed

$
0
0
Hi

I need to pull the following fields from the XML below for each Salesforce_x0020_Data block using XPATH.  Could someone please assist with building the xpath for each of these tags?  Thanks in advance.

Fields I need:
    <Club_x0020_ID>
    <Name>
    <Street>
    <City>
    <State>
    <Postal_x0020_Code>
    <Phone>

XML:
    <?xml version="1.0"?>
    <TestSalesforceAPIResponse xmlns="https://app.planetfitness.com/">
    <TestSalesforceAPIResult>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="NewDataSet">
    <element name="NewDataSet" msdata:UseCurrentLocale="true" msdata:MainDataTable="Salesforce_x0020_Data" msdata:IsDataSet="true">
    <complexType>
    <choice minOccurs="0" maxOccurs="unbounded">
    <element name="Salesforce_x0020_Data">
    <complexType>
    <sequence>
    <element name="Club_x0020_ID" minOccurs="0" type="xs:string"/>
    <element name="Name" minOccurs="0" type="xs:string"/>
    <element name="Street" minOccurs="0" type="xs:string"/>
    <element name="City" minOccurs="0" type="xs:string"/>
    <element name="State" minOccurs="0" type="xs:string"/>
    <element name="Postal_x0020_Code" minOccurs="0" type="xs:string"/>
    <element name="Phone" minOccurs="0" type="xs:string"/>
    </sequence>
    </complexType>
    </element>
    </choice>
    </complexType>
    </element>
    </schema>
    <diffgram xmlns="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
    <NewDataSet xmlns="">
    <Salesforce_x0020_Data diffgr:id="Salesforce Data1" msdata:rowOrder="0" diffgr:hasChanges="inserted">
    <Club_x0020_ID>1234</Club_x0020_ID>
    <Name>SomeClub1234</Name>
    <Street>Some Addr 1234</Street>
    <City>SomeCity1234</City>
    <State>SomeState1234</State>
    <Postal_x0020_Code>SomePC1234</Postal_x0020_Code>
    <Phone>(111) 111-1111</Phone>
    </Salesforce_x0020_Data>
    <Salesforce_x0020_Data diffgr:id="Salesforce Data2" msdata:rowOrder="1" diffgr:hasChanges="inserted">
    <Club_x0020_ID>5678</Club_x0020_ID>
    <Name>SomeClub5678</Name>
    <Street>Some Addr5678</Street>
    <City>SomeCity5678</City>
    <State>SomeState5678</State>
    <Postal_x0020_Code>SomePC5678</Postal_x0020_Code>
    <Phone>(2222) 222-2222</Phone>
    </Salesforce_x0020_Data>
    <Salesforce_x0020_Data diffgr:id="Salesforce Data3" msdata:rowOrder="2" diffgr:hasChanges="inserted">
    <Club_x0020_ID>9012</Club_x0020_ID>
    <Name>SomeClub9012</Name>
    <Street>Some Addr9012</Street>
    <City>SomeCity9012</City>
    <State>SomeState9012</State>
    <Postal_x0020_Code>SomePC9012</Postal_x0020_Code>
    <Phone>(333) 333-3333</Phone>
    </Salesforce_x0020_Data>
    </NewDataSet>
    </diffgram>
    </TestSalesforceAPIResult>
    </TestSalesforceAPIResponse>

Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>