Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML:Parser Problems

Status
Not open for further replies.

klmc

Programmer
Nov 14, 2003
18
US
I have a .xml file that is generated when our company completes an order. What I am needing to do is find when an item is rejected and print it to a file. I have posted a portion of the .xml file. I have never used XML:parser before and am beating my head against a wall to figure it out so that it works for my situation.

Ultimately, I need to grab what is between the product description tags when an item is xsi:type="ns1:confirmationLineItem" and the status is "IR".

Any help that you can give will be greatly appreciated!! I highlighted the info in the example xml file that I am needing help with.

Code:
- <lineItems xsi:type="ns2:Array" ns2:arrayType="ns1:confirmationLineItem[74]">
- [COLOR=red]<item xsi:type="ns1:confirmationLineItem">[/color]
  <brand xsi:type="xsd:string">N/A</brand> 
  <quantity xsi:type="xsd:double">4.0</quantity> 
  [COLOR=red]<status xsi:type="xsd:string">IR</status>[/color]
  <manufacturerName xsi:type="xsd:string">N/A</manufacturerName> 
  <price xsi:type="xsd:double">0.899</price> 
  <splitPackUnit xsi:type="xsd:string">N/A</splitPackUnit> 
  <customCode xsi:type="xsd:string" /> 
  <packQuantity xsi:type="xsd:double">1.0</packQuantity> 
  <packUnit xsi:type="xsd:string">N/A</packUnit> 
  <productNumber xsi:type="xsd:string">1860279</productNumber> 
  <priceByUnit xsi:type="xsd:string">N/A</priceByUnit> 
  [COLOR=red]<productDescription xsi:type="xsd:string">CHICKEN CVP WHL W/OG FRESH</productDescription> [/color]
  <sellByUnit xsi:type="xsd:string">CS</sellByUnit> 
  <packSize xsi:type="xsd:string">N/A</packSize> 
  </item>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top