[Stackoverflow] [Progress OpenEdge ABL] Openedge ABL - write XML

Status
Not open for further replies.
B

BobNoobGuy

Guest
Is it possible to do this in Progress Openedge ABL? I already have the code for Company = A.

Code:
dataset dsOut:write-xml("FILE",dTempXmlFile,true,"UTF-8").

If Company = A then this is the xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
  <LoadNotification>
    <LoadID>10167</LoadID>
    <ShipmentTransferNumber>2320373</ShipmentTransferNumber>
  </LoadNotification>

else if Company = B then this is the xml (notice an additional node appear)

Code:
<?xml version="1.0" encoding="UTF-8"?>
  <LoadNotification>
    <LoadID>10167</LoadID>
    <RetailID>AMZN</RetailID>
    <ShipmentTransferNumber>2320373</ShipmentTransferNumber>
  </LoadNotification>

I want to avoid self closing tag for company A.. I don't want to show <RetailID/> in company A

Code:
<?xml version="1.0" encoding="UTF-8"?>
  <LoadNotification>
    <LoadID>10167</LoadID>
    <RetailID/>
    <ShipmentTransferNumber>2320373</ShipmentTransferNumber>
  </LoadNotification>

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