I created the following code in my C# program but it's giving me error
message at run time of :
XML.XPATH.XPATHEXCEPTION : Namespace Manager or XSLTContext needed. This
query has a prefix, variable or user defined function.
Can someone see what I'm doing wrong? Thanks, Alpha
private XPathDocument unityMessages = new XPathDocument("UnityMessages.xml");
unityMsgNavigator = unityMessages.CreateNavigator();
string query = @"/trans-unit[@id=""m1""]/target[@xml:lang=""fr""]";
XPathExpression queryM1 = unityMsgNavigator.Compile(query);
m1 = (string)unityMsgNavigator.Evaluate(queryM1);
Here is part of the content from my xml file:
<?xml version="1.0" encoding="utf-8" ?>
<xliff version="1.1">
<trans-unit id="m1">
<source xml:lang="en-us">Error populating the children nodes of the
selected node.</source>
<target xml:lang="fr">Translation of "Vous le vou coucher avec moi
sesua?"</target>
</trans-unit>
</xliff>