I am trying to use xpath queries on an xmldocument passed to my web service.
The document nodes have namespace prefixes. How can I programatically
create an xpath query and run it assuming that the namespace and prefix
could potentially change?
Here is an example of my xml (from an infopath form in this case, but could
be from any application)
<?xml version="1.0" encoding="UTF-8"?>
<?mso-infoPathSolution solutionVersion="1.0.0.52" productVersion="11.0.6357"
PIVersion="1.0.0.0"
href="http://testmachine/infopathforms/DocumentLibraryTest.xsn"
name="urn:schemas-microsoft-com:office:infopath:DocumentLibraryTest:-myXSD-2005-07-28T21-22-28"
?><?mso-application progid="InfoPath.Document"?>
<my:Form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-07-28T21:22:28"
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"
xml:lang="en-us">
<my:Header>
<my:PHN>1234</my:PHN>
</my:Header>
<my:Footer>
<my:DateCompleted>2005-08-04</my:DateCompleted>
<my:CompletedBy>123</my:CompletedBy>
</my:Footer>
<my:Description>
<my:Text></my:Text>
</my:Description>
<my:Extra>
<my:Active>false</my:Active>
<my:ExtraText></my:ExtraText>
</my:Extra>
</my:Form>