Hello,
I came to ask you guys about this issue as I am totally lost! Okay, the thing is to retrieve a product details, I have to POST some xml and parse the RESPONSE xml in php.
From php, I need to send the below kinda XML:
<?xml version="1.0" encoding="Windows-1252"?>
<CatRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.xxx.com/Schemas/XMLInterface_Cat.xsd">
<Date>2004-11-17T09:30:47-05:00</Date>
<CatID>1001</CatID>
<Route>
<From>
<CustomerID>123456</CustomerID>
</From>
<To>
<CustomerID>1</CustomerID>
</To>
</Route>
<Filters>
<Filter FilterID="ClassID" Value="MNT"/>
</Filters>
</CatRequest>
If I could send it successfully, I would have the below response:
<?xml version="1.0" encoding="Windows-1252"?>
<CatRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.xxx.com/Schemas/XMLInterface_Cat.xsd">
<PriceCat>
<PriceCatHdr>
<Date>2005-07-14T12:34:28</Date>
<Currency>EUR</Currency>
<Description>Product Catalog</Description>
<CatNumber>1001</CatNumber>
<Filters>
<Filter FilterID="ClassID" Value="MNT" />
</Filters>
<Route>
<From>
<CustomerID>1</CustomerID>
</From>
<To>
<CustomerID>5058954</CustomerID>
</To>
</Route>
</PriceCatHdr>
<ListofCatDetails>
<CatItem>
<Product>
<ProductID>374660</ProductID>
<PartNumber>
<![CDATA[ 105516 ]]>
</PartNumber>
<EANCode>
<![CDATA[ 3660619155163 ]]>
</EANCode>
<Description>
<![CDATA[ LACIE ELECTRON22BLUE IV ]]>
</Description>
</Product>
<Qty ID="1">
<QtyAvailable>3</QtyAvailable>
</Qty>
<Qty ID="2">
<QtyAvailable />
</Qty>
</CatItem>
</ListofCatDetails>
</PriceCat>
Now I have to parse the above response to show the necessary values in php. How can I do this? All suggestions will be appreciated.
Please ask me, if you do not understand my problem clearly.
Regards,
PeeJay