Created
August 16, 2017 08:49
-
-
Save lmatt-bit/898952d65e92f07dac1610353a8f5eb9 to your computer and use it in GitHub Desktop.
xml with namespace; .net
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = @"C:\Users\lmatt\Desktop\MTTest\MT Test 02.docx.xlf"; | |
XmlNamespaceManager namespaceManager = new XmlNamespaceManager(new NameTable()); | |
namespaceManager.AddNamespace("prefix", "urn:oasis:names:tc:xliff:document:1.2"); | |
var xelement = XElement.Load(path); | |
xelement.XPathSelectElements("//prefix:seg-source/prefix:mrk", namespaceManager).Select(e => e.Value).Dump(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment