Movetochild question

W

Westman

Hi all,

I'm quite new to infopath development. I'm having problems on movetochild
method. please see below for example.

xml example:
<?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution
PIVersion="1.0.0.0" solutionVersion="1.0.0.1"
name="urn:schemas-microsoft-com:eek:ffice:infopath:eek:ob:Resume:1033"
productVersion="12.0.0" ?><?mso-application progid="InfoPath.Document"?>
<res:resume
xmlns:res="http://schemas.microsoft.com/office/infopath/2003/sample/Resume"
xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD"
xmlns:xhtml="http://www.w3.org/1999/xhtml" xml:lang="en-us">
<res:personalInformation>
<res:name>
<res:prefix></res:prefix>
<res:givenName></res:givenName>
<res:middleName></res:middleName>
<res:surname></res:surname>
<res:suffix></res:suffix>
<res:singleName>1</res:singleName>


vb code example:
Dim document As XPathDocument = New XPathDocument("testForm.xml")
Dim navigator As XPathNavigator = document.CreateNavigator()
.....
......
navigator.MoveToFirstChild()
MessageBox.Show(navigator.Name) --> will display res:name

but if I use this code, it will failed(false result)
navigator.MoveToChild("res:name", "")
MessageBox.Show(navigator.Name) --> display res:personalInformation

is this the right way to use the method? I've tried everything stated in
msdn example but did not succeed. Appreciate any help on this. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top