[Stackoverflow] [Progress OpenEdge ABL] OpenEdge Progress 4GL WRITE-XML NAMESPACE-PREFIX

Status
Not open for further replies.
B

BobNoobGuy

Guest
Hi Progress OpenEdge dev,

I am using the following syntax to generate an XML file from temp table. All is good but for one item.

dataset dsCust:write-xml("FILE", "c:/Test/Customer.xml", true).


This is my temp table declaration

def temp-table ttCustomer no-undo
namespace-uri "http://WMS.URI"
namespace-prefix "ns0"
field PurchaseOrderNumber as char
field Plant as char.


This is my output

<ns0:GoodsReceipt xmlns:ns0="http://WMS.URI">
<ns0:purchaseOrderNumber/>
<ns0:plant>Rose</ns0:plant>
</ns0:GoodsReceipt>


But this is my desired output

<ns0:GoodsReceipt xmlns:ns0="http://WMS.URI">
<PurchaseOrderNumber/>
<Plant>Rose</Plant>
</ns0:GoodsReceipt>


Notice the element inside GoodsReceipt node does not have ns0 prefix. Can this achived using write-xml? I want to avoid using DOM or SAX if possible.

Thank you

Continue reading...
 
Status
Not open for further replies.
Top