Jump to content

change data from an XML file getting data from another


Recommended Posts

Hi all, I have 2 xml files: file1:

<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="../helpproject.xsl" ?><topic template="Default" lasteditedby="fjuras" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../helpproject.xsd">  <body>    <para styleclass="Normal"><text styleclass="Normal" translate="true">Enter the </text><lang>button1</lang><text styleclass="Normal" translate="true">by tapping the list icon</text>  </body></topic>

file2:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><language id="lang.main" name="English (British)" iso="GBR" langIso="ENG" charset="roman" charsetSpecial="special" usingCJK="no" R2L="no"><lang id="button1" text="Menu"/></language>

My problem is that I want to replace the <lang>button1</lang> in file1 with <text>Menu</text> from the file2. I have to do this, because the names from the file2 are changing a lot, but ids stays the same. I cannot modify the file helpproject.xsl. This file is the final stylesheet. I want to be made this modification before displayng the content. I would like to do this or by writing something directly in the file1 or making some new external xsl file which will do this.If there is any posibility to do this please respond me, cause I'm now out of any idea how can this be made. Thanks a lot.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...