I have an xml file, and I need to convert it into a text file.
xml:
<?xml version="1.0" encoding="UTF-8" ?>
- <po-response xmlns="http://seller.marketpl ace.sears.com/oms/v1" xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocat ion="https://seller.marketpl ace.sears.com//SellerPortal/s/schema/oms/purchaseorder-v1.xsd">
- <purchase-order>
<po-number>2180031</po-number>
<po-date>2009-12-27</po-date>
<expected-ship-date>2010-01-01</expected-ship-date>
- <shipping-detail>
<ship-to-name>WILLIAM BENTLEY</ship-to-name>
<city>INDIANAPO LIS</city>
<state>IN</state>
<zipcode>4622 1</zipcode>
<shipping-method>Ground</shipping-method>
</shipping-detail>
<customer-name>WILLIAM BENTLEY</customer-name>
- <po-line>
- <po-line-header>
<line-number>2</line-number>
<item-id>PRP2008</item-id>
<item-name>Kicker DSM60 6.5 Inch Coaxial 2-Way Speakers</item-name>
<item-sell-price>3900</item-sell-price>
<order-quantity>2</order-quantity>
</po-line-header>
- <po-line-detail>
<po-line-status>SHIPPED</po-line-status>
<quantity>2</quantity>
</po-line-detail>
</po-line>
- <po-line>
- <po-line-header>
<line-number>1</line-number>
<item-id>PRP2047</item-id>
<item-name>Kenwood KDC-138 AM/FM/CD-Receiver</item-name>
<item-sell-price>9437</item-sell-price>
<order-quantity>1</order-quantity>
</po-line-header>
- <po-line-detail>
<po-line-status>SHIPPED</po-line-status>
<quantity>1</quantity>
</po-line-detail>
</po-line>
<order-subtotal>172.37 </order-subtotal>
<sales-tax>13.54</sales-tax>
<shipping-fees>20.95</shipping-fees>
<order-total>206.86</order-total>
<po-status>CLOSED</po-status>
</purchase-order>
How can I convert this to a text file containing most of these fields?
Thank you.
xml:
<?xml version="1.0" encoding="UTF-8" ?>
- <po-response xmlns="http://seller.marketpl ace.sears.com/oms/v1" xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocat ion="https://seller.marketpl ace.sears.com//SellerPortal/s/schema/oms/purchaseorder-v1.xsd">
- <purchase-order>
<po-number>2180031</po-number>
<po-date>2009-12-27</po-date>
<expected-ship-date>2010-01-01</expected-ship-date>
- <shipping-detail>
<ship-to-name>WILLIAM BENTLEY</ship-to-name>
<city>INDIANAPO LIS</city>
<state>IN</state>
<zipcode>4622 1</zipcode>
<shipping-method>Ground</shipping-method>
</shipping-detail>
<customer-name>WILLIAM BENTLEY</customer-name>
- <po-line>
- <po-line-header>
<line-number>2</line-number>
<item-id>PRP2008</item-id>
<item-name>Kicker DSM60 6.5 Inch Coaxial 2-Way Speakers</item-name>
<item-sell-price>3900</item-sell-price>
<order-quantity>2</order-quantity>
</po-line-header>
- <po-line-detail>
<po-line-status>SHIPPED</po-line-status>
<quantity>2</quantity>
</po-line-detail>
</po-line>
- <po-line>
- <po-line-header>
<line-number>1</line-number>
<item-id>PRP2047</item-id>
<item-name>Kenwood KDC-138 AM/FM/CD-Receiver</item-name>
<item-sell-price>9437</item-sell-price>
<order-quantity>1</order-quantity>
</po-line-header>
- <po-line-detail>
<po-line-status>SHIPPED</po-line-status>
<quantity>1</quantity>
</po-line-detail>
</po-line>
<order-subtotal>172.37 </order-subtotal>
<sales-tax>13.54</sales-tax>
<shipping-fees>20.95</shipping-fees>
<order-total>206.86</order-total>
<po-status>CLOSED</po-status>
</purchase-order>
How can I convert this to a text file containing most of these fields?
Thank you.
Comment