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 10.2 X-document node attributes order

Discussão em 'StackOverflow' iniciado por fdantas, Janeiro 7, 2020.

  1. fdantas

    fdantas Administrator Moderador

    Is there a way in OE to set the order for a node attributes?

    I need this result:

    <MyNode MyNode="aaa" Attribute1="bbb" Attribute2="ccc" Attribute3="ddd"/>


    I use this code:

    hDoc:CREATE-NODE(hAttribute, "MyNode", "ELEMENT").
    hAttribute:SET-ATTRIBUTE("MyNode", "aaa").
    hAttribute:SET-ATTRIBUTE("Attribute1", "bbb").
    hAttribute:SET-ATTRIBUTE("Attribute2", "ccc").
    hAttribute:SET-ATTRIBUTE("Attribute3", "ddd").
    hNode:APPEND-CHILD(hAttribute).


    but it keeps creating this messed up output:

    <MyNode Attribute1="bbb" MyNode="aaa" Attribute2="ccc" Attribute3="ddd"/>


    Or is it because of the node name and the attribute name is the same? But there has to be a way to put that node-name-attribute to the first place... Thanks for the help!

    Continue reading...

Compartilhe esta Página