EDN Admin
Well-known member
Greetings,
I was looking for an answer but no luck finding it.
I have 2 xml files that need to be merged.
1. file (prices.xml)
<CONTENT><PRICE><br/>
<WIC>ASR-5405_ROHS_SGL</WIC><br/>
<VENDOR_NAME>ADAPTEC</VENDOR_NAME><br/>
<GROUP_NAME>Controller ( RAID )</GROUP_NAME><VPF_NAME/><CURRENCY_CODE>HRK</CURRENCY_CODE><AVAIL>4</AVAIL><RETAIL_PRICE>2916.77</RETAIL_PRICE></PRICE></CONTENT>
2. file (catalog.xml)
<Product><br/>
<ProductCode>ASR-5405_ROHS_SGL</ProductCode><br/>
<Vendor>ADAPTEC</Vendor><br/>
<ProductType>Cable</ProductType><br/>
<ProductCategory>Cables</ProductCategory><br/>
<ProductDescription>INTEL Serial Cable (1xRJ-45 (Male) - 1xD-Sub 9-pin (DB-9)) for Intel® Server Chassis SR1300(Coronado-W), Intel® Server Chassis SR2300(Stayton-W)</ProductDescription><br/>
<Image>https://www.it4profit.com/catalogimg/wic/1/AXXRJ45DB92</Image><br/>
<ProductCard>https://content.it4profit.com/itshop/itemcard_cs.jsp?ITEM=50409104041464518&THEME=asbis&LANG=hr</ProductCard><br/>
<AttrList><br/>
<element Name="Cable Functionality" Value="Serial Cable"/><br/>
<element Name="Platform Compability" Value="PC"/><br/>
<element Name="Left Connector Type" Value="RJ-45"/><br/>
<element Name="Left Connector Gender" Value="Male"/><br/>
<element Name="Left Connector Quantity" Value="1"/><br/>
<element Name="Right Connector Type" Value="D-Sub 9-pin (DB-9)"/><br/>
<element Name="Right Connector Quantity" Value="1"/><br/>
<element Name="Parent Products(1)" Value="Intel® Server Chassis SR1300(Coronado-W), Intel® Server Chassis SR2300(Stayton-W)"/><br/>
<element Name="Nominal Weight" Value="0.5875 kg"/><br/>
<element Name="Pack Weight Brutto (kg)" Value="0.5875 kg"/><br/>
<element Name="Pieces in pack" Value="1"/><br/>
</AttrList><br/>
<MarketingInfo><br/>
<element>Intel is the world leader in the field of computer engineering, computer innovations, development of software and hardware. Specialists Intel did not stop searching for new ways to make the next leap ahead - in
the IT-technology, education, culture, production and social sphere.</element><br/>
</MarketingInfo><br/>
<Images><br/>
<Image>https://content.it4profit.com/pimg/s/resize/160x160x160x160/110519101431810915.jpg</Image><br/>
<Image>https://content.it4profit.com/pimg/s/resize/400x300x400x300/110519101431813128.jpg</Image><br/>
<Image>https://content.it4profit.com/pimg/s/resize/362x362x362x362/110519101431861327.jpg</Image><br/>
<Image>https://content.it4profit.com/pimg/s/resize/362x362x362x362/110519101431818713.jpg</Image><br/>
</Images><br/>
</Product><br/>
Now, I need to pull out images from catalog.xml to prices.xml where product code is equal to WIC.
Not sure how to do this so any help would be appreciated.
Thanks.
View the full article
I was looking for an answer but no luck finding it.
I have 2 xml files that need to be merged.
1. file (prices.xml)
<CONTENT><PRICE><br/>
<WIC>ASR-5405_ROHS_SGL</WIC><br/>
<VENDOR_NAME>ADAPTEC</VENDOR_NAME><br/>
<GROUP_NAME>Controller ( RAID )</GROUP_NAME><VPF_NAME/><CURRENCY_CODE>HRK</CURRENCY_CODE><AVAIL>4</AVAIL><RETAIL_PRICE>2916.77</RETAIL_PRICE></PRICE></CONTENT>
2. file (catalog.xml)
<Product><br/>
<ProductCode>ASR-5405_ROHS_SGL</ProductCode><br/>
<Vendor>ADAPTEC</Vendor><br/>
<ProductType>Cable</ProductType><br/>
<ProductCategory>Cables</ProductCategory><br/>
<ProductDescription>INTEL Serial Cable (1xRJ-45 (Male) - 1xD-Sub 9-pin (DB-9)) for Intel® Server Chassis SR1300(Coronado-W), Intel® Server Chassis SR2300(Stayton-W)</ProductDescription><br/>
<Image>https://www.it4profit.com/catalogimg/wic/1/AXXRJ45DB92</Image><br/>
<ProductCard>https://content.it4profit.com/itshop/itemcard_cs.jsp?ITEM=50409104041464518&THEME=asbis&LANG=hr</ProductCard><br/>
<AttrList><br/>
<element Name="Cable Functionality" Value="Serial Cable"/><br/>
<element Name="Platform Compability" Value="PC"/><br/>
<element Name="Left Connector Type" Value="RJ-45"/><br/>
<element Name="Left Connector Gender" Value="Male"/><br/>
<element Name="Left Connector Quantity" Value="1"/><br/>
<element Name="Right Connector Type" Value="D-Sub 9-pin (DB-9)"/><br/>
<element Name="Right Connector Quantity" Value="1"/><br/>
<element Name="Parent Products(1)" Value="Intel® Server Chassis SR1300(Coronado-W), Intel® Server Chassis SR2300(Stayton-W)"/><br/>
<element Name="Nominal Weight" Value="0.5875 kg"/><br/>
<element Name="Pack Weight Brutto (kg)" Value="0.5875 kg"/><br/>
<element Name="Pieces in pack" Value="1"/><br/>
</AttrList><br/>
<MarketingInfo><br/>
<element>Intel is the world leader in the field of computer engineering, computer innovations, development of software and hardware. Specialists Intel did not stop searching for new ways to make the next leap ahead - in
the IT-technology, education, culture, production and social sphere.</element><br/>
</MarketingInfo><br/>
<Images><br/>
<Image>https://content.it4profit.com/pimg/s/resize/160x160x160x160/110519101431810915.jpg</Image><br/>
<Image>https://content.it4profit.com/pimg/s/resize/400x300x400x300/110519101431813128.jpg</Image><br/>
<Image>https://content.it4profit.com/pimg/s/resize/362x362x362x362/110519101431861327.jpg</Image><br/>
<Image>https://content.it4profit.com/pimg/s/resize/362x362x362x362/110519101431818713.jpg</Image><br/>
</Images><br/>
</Product><br/>
Now, I need to pull out images from catalog.xml to prices.xml where product code is equal to WIC.
Not sure how to do this so any help would be appreciated.
Thanks.
View the full article