You are currently working on UAT 

Processing XML file with translatable="false" content?

Hi,

 

I am going to process XML file but strings got extracted where translatable ="false" is written.

I have done the parser settings as well

Element: Strings

Properties: Translatable (but not in protected content).

 

Please help

Parents Reply
  • Hello Amit,

    you have to tell the parser to omit elements where the attribute "translatable" has the value "false". It's a bit more straightforward if you tell the parser to extract only the elements that have the attribute value of "true", which I assume is the fact, at least one would hope...

    So your XPath might read:

    //text[@translatable="true"]

    It all depends on how your XML file is structured, there are certain rules, but they are wide and often broken. The above XPath would select/extract all element content from elements like this:

    <text translatable="true">This is the content</text>

    I think Studio goes through the parsing rules until it finds one that matches, then moves to the next node. In this case you could make the rule:

    //text[@translatable="false"]

    and define the text as "not translatable". There are circumstances where this might be preferrable.

    You can find more information here: https://www.w3schools.com/xml/xpath_syntax.asp

    Hope this is a help.

    Daniel

Children