Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.