Sbau
Member
Hi everyone,
I'am struggling with something. I have a xml file where there are 2 invoices. For each invoice there is a SHAN tag. There is also a tag MSG0809_DS01_ID263 taht is in the 1st invoice, but not the second. It looks like this:
<R574256A>
<Numero_de_Facture_LBH_DOC_S6>
...
<DocVoucherInvoiceE_ID16>21201599</DocVoucherInvoiceE_ID16>
<DocumentOrderInvoiceE_ID189>11062505</DocumentOrderInvoiceE_ID189>
<OrderType_ID191>CV</OrderType_ID191>
...
<Client_Livre_LBH_SHAN_S8>
<AddressNumberShipTo_ID2>48612760</AddressNumberShipTo_ID2>
</Client_Livre_LBH_SHAN_S8>
</Numero_de_Facture_LBH_DOC_S6>
<Numero_de_Facture_LBH_DOC_S6>
...
<DocVoucherInvoiceE_ID16>21201603</DocVoucherInvoiceE_ID16>
<DocumentOrderInvoiceE_ID189>11081454</DocumentOrderInvoiceE_ID189>
<OrderType_ID191>CV</OrderType_ID191>
<MSG0809_DS01_ID263>REGUL POUR ERREUR FACTURATION DU 21/04</MSG0809_DS01_ID263>
...
<Client_Livre_LBH_SHAN_S8>
<AddressNumberShipTo_ID2>48923171</AddressNumberShipTo_ID2>
</Client_Livre_LBH_SHAN_S8>
</Numero_de_Facture_LBH_DOC_S6>
</R574256A>
I am interested in the MSG0809_DS01_ID263 tag, that exists only in the second invoice tag. This is just a text message that sometimes appear on an invoice or not.
In my rtf, I have a for each group on Client_Livre_LBH_SHAN_S8. Inside this group, I want to print the MSG0809_DS01_ID263. So I used the command : <?../MSG0809_DS01_ID263?> to get the tag from the parent node.
My problem is that when I run the rtf onto a pdf, the value of MSG0809_DS01_ID263 appears on BOTH invoices. My understanding is that the XPath command "../" gets every SIBLINGS of the current parent node - and since MSG0809_DS01_ID263 is not in the first invoice, the XPath process gets it in the second invoice.
Is there anyway I can force the program to get MSG0809_DS01_ID263 only from the parent of the current node, and only there?
Thank you very much for your help,
Samuel
I'am struggling with something. I have a xml file where there are 2 invoices. For each invoice there is a SHAN tag. There is also a tag MSG0809_DS01_ID263 taht is in the 1st invoice, but not the second. It looks like this:
<R574256A>
<Numero_de_Facture_LBH_DOC_S6>
...
<DocVoucherInvoiceE_ID16>21201599</DocVoucherInvoiceE_ID16>
<DocumentOrderInvoiceE_ID189>11062505</DocumentOrderInvoiceE_ID189>
<OrderType_ID191>CV</OrderType_ID191>
...
<Client_Livre_LBH_SHAN_S8>
<AddressNumberShipTo_ID2>48612760</AddressNumberShipTo_ID2>
</Client_Livre_LBH_SHAN_S8>
</Numero_de_Facture_LBH_DOC_S6>
<Numero_de_Facture_LBH_DOC_S6>
...
<DocVoucherInvoiceE_ID16>21201603</DocVoucherInvoiceE_ID16>
<DocumentOrderInvoiceE_ID189>11081454</DocumentOrderInvoiceE_ID189>
<OrderType_ID191>CV</OrderType_ID191>
<MSG0809_DS01_ID263>REGUL POUR ERREUR FACTURATION DU 21/04</MSG0809_DS01_ID263>
...
<Client_Livre_LBH_SHAN_S8>
<AddressNumberShipTo_ID2>48923171</AddressNumberShipTo_ID2>
</Client_Livre_LBH_SHAN_S8>
</Numero_de_Facture_LBH_DOC_S6>
</R574256A>
I am interested in the MSG0809_DS01_ID263 tag, that exists only in the second invoice tag. This is just a text message that sometimes appear on an invoice or not.
In my rtf, I have a for each group on Client_Livre_LBH_SHAN_S8. Inside this group, I want to print the MSG0809_DS01_ID263. So I used the command : <?../MSG0809_DS01_ID263?> to get the tag from the parent node.
My problem is that when I run the rtf onto a pdf, the value of MSG0809_DS01_ID263 appears on BOTH invoices. My understanding is that the XPath command "../" gets every SIBLINGS of the current parent node - and since MSG0809_DS01_ID263 is not in the first invoice, the XPath process gets it in the second invoice.
Is there anyway I can force the program to get MSG0809_DS01_ID263 only from the parent of the current node, and only there?
Thank you very much for your help,
Samuel