and the required output format is:<?xml version="1.0" encoding="UTF-8"?> <response> <result name="response" numFound="58582" start="0"> <doc> <str name="body">Have a great time at this park!</str><int name="is_pa +rk_id">317851</int><str name="ss_image_thumb_small"/> <str name="title">Playground</str> </doc> <doc> <str name="body">Have a great time at this park!</str><int name="is_pa +rk_id">317851</int><str name="ss_image_thumb_small"/> <str name="title">Playground</str> </doc> </result> </response>
<str name="body"> should be treated as description, <int name="is_park_id"> should be treated as <ExternalId> and <str name="title"> should be treated as <Name>. Could you help in formatting the XML to new format?<?xml version="1.0" encoding="iso-8859-1"?> <Feed> <Products> <Product> <Description>Have a great time at this park!</Description><ExternalId> +PF317851</ExternalId><ImageUrl/> <Name>Playground</Name> </Product> <Product> <Description>Have a great time at this park!</Description><ExternalId> +PF317851</ExternalId><ImageUrl/> <Name>Playground</Name> </Product> </Products> </Feed>
In reply to Perl - Modify the nested XML tags by Murari
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |