I recieved an xml file from a company with their error codes and i'm having problems getting the inner value. what i need is the Text for the error code if someone could help me that would be great. The one requierment my company has is the xml has to be an embeded resource.
<ErrCodes>
<Error id="102">Name missing from this item in catalog.</Error>
</ErrCodes>
the function i have been trying to create is below but
Function Readerrors(ByVal sError)
Dim str = ""
Dim strResources As String = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name & ".Errors.xml"
Dim document As XPathDocument = New XPathDocument(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(strResources))
Dim navigator As XPathNavigator = document.CreateNavigator()
Dim node As XPathNavigator = navigator.SelectSingleNode("//ErrCodes[@id=" & sError & "]")
str = node.InnerXml
Return str
End Function