專案要使用xml傳輸數據,例如:
<logisticsEventsRequest>
<logisticsEvent>
<eventHeader>
<eventType> LOGISTICS _TMS_CONFIRM_DUTYS </eventType>
<eventTime>2013308:201308:0041; :00</eventTime>
<eventSource> STORECODE </eventTime>
<eventTarget>CP</eventTarget>
</eventHeader>
<eventBody>
</eventHeader>
;logisticsDetail>
<logisticsOrders>
<logisticsOrder>
<poNo>LP682343244</ poNo >
<occurTime>2013-03-08<occurTime>2013-03-08<occurTime>2013-03-08<occurTime>2013-03-08< ;confirmPaymethod>A</confirmPaymethod >
<logisticsRemark>扣款後請放行</logisticsRemark>
</logisticsOrder> ##1</logisticsOrders>#Delttail>#<tail</logisticsOrders>
</eventBody>
</logisticsEvent>
</logisticsEventsRequest>
xml 的內容要構建,如果傳輸 json,直接創建物件然後轉換json,現在要傳輸xml,有什麼方便的方式麼?