I am getting no nodes from the following code:
'Put user code to initialize the page here
Dim listService As New com.domain.my.L ists
listService.Cre dentials =
System.Net.Cred entialCache.Def aultCredentials
Dim xmlDoc = New System.Xml.XmlD ocument
Dim ndQuery As XmlNode = xmlDoc.CreateNo de(XmlNodeType. Element,
"Query", "")
Dim ndViewFields As XmlNode = xmlDoc.CreateNo de(XmlNodeType. Element,
"ViewFields ", "")
Dim ndQueryOptions As XmlNode =
xmlDoc.CreateNo de(XmlNodeType. Element, "QueryOptio ns", "")
ndQueryOptions. InnerXml =
"<IncludeMandat oryColumns>FALS E</IncludeMandator yColumns>" + _
"<DateInUtc>TRU E</DateInUtc>"
ndViewFields.In nerXml = "<FieldRef Name='Title'/><FieldRef
Name='URL'/><FieldRef Name='Category'/>"
ndQuery.InnerXm l = ""
Try
Dim ndListItems As XmlNode = listService.Get ListItems("Tool bar",
Nothing, ndQuery, ndViewFields, Nothing, ndQueryOptions)
Dim doc As XmlDocument = New XmlDocument
doc.LoadXml(Rep lace(ndListItem s.InnerXml, ControlChars.Lf &
ControlChars.Lf , ""))
Dim nsmgr As XmlNamespaceMan ager = New
XmlNamespaceMan ager(doc.NameTa ble)
nsmgr.AddNamesp ace("z", "#RowsetSchema" )
nsmgr.AddNamesp ace("rs", "urn:schema s-microsoft.com:r owset")
Dim node As XmlNode
Dim xl As XmlNodeList = doc.SelectNodes ("/rs:data/z:row", nsmgr)
For Each node In xl
Debug.WriteLine (node.Attribute s("ows_Title" ))
Next
Debug.WriteLine (ndListItems.In nerXml)
Catch ex As System.Web.Serv ices.Protocols. SoapException
Debug.WriteLine ("Message:" & vbCrLf & ex.Message + vbCrLf +
"Detail:" + vbCrLf + ex.Detail.Inner Text + ControlChars.Lf + "StackTrace :" +
ControlChars.Lf + ex.StackTrace)
End Try
The following is the Outer XML that I am receiving back, which clearly has
records.
<listitems xmlns:s="uuid:B DC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
xmlns:dt="uuid: C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:rs="urn:s chemas-microsoft-com:rowset" xmlns:z="#Rowse tSchema"
xmlns="http://schemas.microso ft.com/sharepoint/soap/">
<rs:data ItemCount="3">
<z:row ows_Title="Yaho o" ows_URL="http://www.yahoo.com"
ows_Category="S ites" ows_ID="1" ows_owshiddenve rsion="1" />
<z:row ows_Title="Goog le" ows_URL="http://www.google.com"
ows_Category="T ools" ows_ID="2" ows_owshiddenve rsion="1" />
<z:row ows_Title="Shar ePoint Help"
ows_URL="/_vti_bin/help/1033/sps/html/SharePointHelp. htm" ows_Category="H elp"
ows_ID="3" ows_owshiddenve rsion="3" />
</rs:data>
</listitems>
Am I missing something?
Thanks!