Extracting XML content - order of XPaths.
Problem:
user was trying to parse the XML file which contains elements like this:
<para>Accounting: Subscription Term (<dynamic_inline alt_text="Setup > Accounting > Accounting" role="dyn_help_taskpath">ACCOUNTING</dynamic_inline>)</para>
However the problem user encounters is that he needs to extract also text under alt_text. Even though the user defined XPath to extract this it does not work:

Solution:
XPaths are executed sequentially, meaning that if one element matches an XPath, then this element is marked for online translation. All other elements that could match any other XPath inside this element will be ignored to avoid needing translating twice the same text, in different segments.
In this example it means that //@alt_text must be before //*[local-name()="para"] to be able to extract the content of //@alt_text.
Like on this screenshot:

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
0 Kommentare