sponsored links

Collapse

Announcement

Collapse
No announcement yet.

xml-into vs parsing node within qualified name

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • xml-into vs parsing node within qualified name

    Hello Mates,

    I have problem with parsing node base on xml-into function which have in name dotes e.g.


    <Item>
    <itemNo>123456</itemNo>
    <title>alibaba</title>
    <price>40.00</price>
    <User.Reference.Item>
    ...
    ...
    </User.Reference.Item>
    </Item>

    I described it as data structure

    DCL-DS item Qualified;
    ItemNo Char(15);
    titele Char(30);
    price Numeric( 15:2);
    UserReferenceItem LikeDS( aaaa);
    End-Ds;
    DCL-DS aaaa qualified;
    ....
    ....
    End-ds;

    and problem has with User.Referenc.Item

    Regards & thanks for response
    Makaga5

  • #2
    Hi,

    case=convert does the trick.

    Code:
      dcl-ds Item qualified;
        User_Reference_Item varchar(100);
      end-ds;
    
      dcl-s chrXml varchar(1000) inz('<Item><User.Reference.Item>Bla123</User.Reference.Item></Item>');
    
      xml-into Item %xml(chrXml:
                           'doc=string +
                            case=convert +
                            path=Item +
                          ');
    See the 2. section at https://www.ibm.com/support/knowledg...aseconvxmp.htm

    Best,
    Markus

    Comment


    • malaga5
      malaga5 commented
      Editing a comment
      Thank Markus,

      I try to apply this part

      many thanks
      Malaga

  • #3
    Thank Markus,

    I try to apply this part

    many thanks
    Malaga

    Comment

    Working...
    X