古い XML スタイルの API を処理する必要があります。
Ember や Angular、さらには Meteor などの最新の JS フレームワークを使用したいのですが、XML データを使用する必要があり、これらのフレームワークは現在 JSON に基づいているため、何を期待すればよいかわかりません。
リクエストの例:
<?xml version="1.0" encoding="UTF-8"?>
<OrderXML>
<CustomerID>3</CustomerID>
<Password>Webgistix</Password>
<Order>
<ReferenceNumber>ABC123</ReferenceNumber>
<Company>Test Company</Company>
<Name>Joe Smith</Name>
<Address1>123 Main St.</Address1>
<Address2></Address2>
<Address3></Address3>
<City>Olean</City>
<State>NY</State>
<ZipCode>14760</ZipCode>
<Country>United States</Country>
<Email>info@webgistix.com</Email>
<Phone>1-123-456-7890</Phone>
<ShippingInstructions>Ground</ShippingInstructions>
<OrderComments>Test Order</OrderComments>
<Approve>0</Approve>
<Item>
<ItemID>example-item-1</ItemID>
<ItemQty>1</ItemQty>
</Item>
</Order>
応答例:
<?xml version="1.0" encoding="UTF-8"?>
<Completed>
<Success>True</Success>
<OrderID>12345</OrderID>
<BackOrder>False</BackOrder>
</Completed>
これに対処する方法の例はありますか?