I have an XElement
and an XPath
expression that selects a node from it. It works fine in the original program that I wrote it in but doesnt work if I paste it to another program. I've checked the references and import statements. What am i doing wrong?
I think the problem might be that the original program had the code within the class of a wpf window while it was moved to a abstract class where it doesnt work.
Dim X As XElement = _
Dim XPath As String
XPath = "//Transform3DGroup/TranslateTransform3D"
X.XPathSelectElement(XPath).SetAttributeValue("OffsetX", "5")
Console.WriteLine(X.ToString)