|
|
|
|
|
by rhdunn
290 days ago
|
|
What language? In Python, the `find`, `findall`, etc. methods take a namespace dictionary. E.g. result = doc.findall("//w:t", namespaces={"w": "..."})
In C# you can do: var navigator = doc.Root!.CreateNavigator();
nsManager = new XmlNamespaceManager(navigator.NameTable);
nsManager.AddNamespace("w", "...");
var results = doc.Root?.XPathSelectElements("//w:t", nsManager);
In Java you need to enable a namespace-aware flag in the settings to get namespaces to work. I can't recall off-hand how to do that. |
|