1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

OpenEdge Progress 4GL WRITE-XML NAMESPACE-PREFIX

Discussão em 'StackOverflow' iniciado por fdantas, Agosto 22, 2018.

  1. fdantas

    fdantas Administrator Moderador

    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...

Compartilhe esta Página