Hi,
Forgive me if I'm posting to the wrong newsgroup.
How do you bind a nested xml file (which has a namespace in its root
node) to a repeater control?
I currently load the xml file into an xmldocument and retrieve an
xmlnodelist from it like this (code-behind):
'mngr is the name of the xmlnamespacemanager
dim nodeList as XmlNodeList =
doc.SelectNodes("nnm:Books/nnm:Book/nnm:Title", mngr)
Repeater1.DataSource = nodeList
Repeater1.DataBind()
In the .aspx this is my databindig syntax:
<%# Ctype(Container.DataItem,
System.Xml.XmlNode))("ElementName").InnerText %>
Everything works well, until I get to this:
<%# Ctype(Container.DataItem,
System.Xml.XmlNode))("ElementName/ElementName").InnerText %>
I always get the "Object not set to an instance of an object" error.
Can anyone show me what I'm doing wrong here? Any assistance would be
greatly appreciated.
Thanks,
Roshawn
Buddy Ackerman - 18 Jun 2005 05:34 GMT
My XML nodes use attributes and I got it to work using the follwoing syntax:
<%# cType(Container.DataItem, XmlNode).Attributes.itemOf("groupID").innerText %>)">
--Buddy
> Hi,
>
[quoted text clipped - 28 lines]
> Thanks,
> Roshawn