SHARE
TWEET

Untitled

a guest Jun 25th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. XmlDocument xliffDoc = new XmlDocument();
  2. xliffDoc.Load(filePath);
  3.  
  4. XmlNamespaceManager xmlNSS = new XmlNamespaceManager(xliffDoc.NameTable);
  5. xmlNSS.AddNamespace("st-xmlns", @"urn:oasis:names:tc:xliff:document:1.2");
  6.  
  7. foreach (XmlNode transUnit in transUnits)
  8. {
  9.   //Change innerXML while keeping the structure
  10. }
  11. xliffDoc.Save(filePath);
  12.      
  13. .....
  14. <trans-unit id="17645" identifier="5df0c6519f50ac44d2e9c94c1cf841d4" approved="yes">
  15.   <source>LDL ("Bad" Cholesterol)</source>
  16.   <target>LDL („Schlechtes“ Cholesterin)</target>
  17.   <note>Context: me.body.ldl.text</note>
  18. </trans-unit>
  19. .....
  20.      
  21. .....
  22. <trans-unit id="17645" identifier="5df0c6519f50ac44d2e9c94c1cf841d4" approved="yes">
  23.   <source>LDL ("Bad" Cholesterol)</source>
  24.   <target>LDL („Schlechtes“ Cholesterin)</target>
  25.   <note>Context: me.body.ldl.text</note>
  26. </trans-unit>
  27. .....
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top