Hi
In infopath, I use a XPath expression to get some nodes :
var oEMailNodeList = XDocument.DOM.selectNodes("//Message/EMail");
My problem is that this method returns 0 items. Here is the DOM.xml property
:
<?xml version="1.0" ?>
<?mso-infoPathSolution productVersion=\"11.0.5329\" PIVersion=\"1.0.0.0\"
href=\"file:///C:\Documents%20and%20Settings\t-stevbe\Local%20Settings\Appli
cation%20Data\Microsoft\InfoPath\7ab6e8af39fc42e2\ manifest.xsf\"
solutionVersion=\"1.0.0.9\" initialView=\"messagesList\" ?>
<?mso-application progid=\"InfoPath.Document\"?>
<dfs:myFields
xmlns:my="\"http://schemas.microsoft.com/office/infopath/2003/myXSD/2003-07-
24T09:51:34\"
xmlns:s1="\"http://microsoft.com/wsdl/types/\"
xmlns:s0="\"http://tempuri.org/\"
xmlns:dfs="\"http://schemas.microsoft.com/office/infopath/2003/dataFormSolut
ion\"
xml:lang="\"fr\">
<dfs:queryFields>
<s0:GetMessagesByUserName>
<s0:userName>EUROPE\t-stevbe</s0:userName>
</s0:GetMessagesByUserName>
</dfs:queryFields>
<dfs:dataFields>
<GetMessagesByUserNameResponse xmlns="\"http://tempuri.org/\">
<GetMessagesByUserNameResult />
<messages>
<Message>
<UserName>DOMAIN\user</UserName>
<EMail>us**@domain.com</EMail>
<MessageTitle>Test</MessageTitle>
<MessageBody>etettete</MessageBody>
<MessageID>bd3d5156-3960-4074-a7f8-f75d35e61219</MessageID>
<MessageDate>2003-07-21T15:52:11.8770000+02:00</MessageDate>
</Message>
</messages>
</GetMessagesByUserNameResponse>
</dfs:dataFields>
</dfs:myFields>
Is the XPath expression correct ??
Note that the expression "//dfs:dataFields" return actually the right node,
but the expression "//dfs:dataFields/GetMessagesByUserNameResponse" return 0
items.
Thanks for any help !
Steve