Skip to Content
author's profile photo
Former Member

Xpath expression

Hi experts,

I have this kind of file :

<Msg>

<Body>

<Payload Role="S">

<Msg>

<Body>

<Payload Role="S">

<BOM>

<BO>

<Documents>

<DocEntry>123<Docentry/>

...........

</Documents>

</BO>

</BOM>

</Payload>

</Body>

</Msg>

</Payload>

</bODY>

</mSG>

I would like to get the value of DocEntry in my <xsl:value of select=""/> but I don't know what is the correct syntaxe to use with the payload S.

Can you help me please?

Thanks

Best regards

Sarah

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Posted on Aug 06, 2014 at 03:51 PM

    Hello Sarah,

    Try this Msg/Body/Payload[@Role='S']/Msg/Body/Payload[@Role='S']/BOM/BO/Documents/DocEntry, if this xml came from an atom, try $msg//Msg/Body/Payload[@Role='S']/BOM/BO/Documents/DocEntry.

    Regards,

    Leo.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      The first step works fine but the second fails and the result message is :

      Exception : Invoke of: ReadXml Source: Description: '' is not a valid value for property 'U_PFL_TypCde'. The valid values are: 'NO' - 'NO', 'EX' - 'EX', 'TRF' - 'TRF', 'CDS' - 'CDS', 'WEB' - 'WEB'

      or when I delete the UPFLTypCde the message is :

      Exception : Invoke of: ReadXml Source: Description: Property 'Conformite' of 'Document' is invalid

      and when I delete again Conformite I have this message:

      Exception : DI Error: (-2028) No matching records found (ODBC -2028)


      In resume, The system doesn't get back informations to create the delivery notes


      Do you see where is my mistake in my syntaxe please?


      Thank you for your help


      Best regards


      Sarah