ActiveReports 8
NodeList Property
See Also  Example
GrapeCity.ActiveReports.v8 Assembly > GrapeCity.ActiveReports.Data Namespace > XMLDataSource Class : NodeList Property

Glossary Item Box

Gets or sets a reference to the XmlNodeList object that is the result of applying the XPath pattern provided in the RecordsetPattern property.

Syntax

Visual Basic (Declaration) 
Public Property NodeList As System.Xml.XmlNodeList
C# 
public System.Xml.XmlNodeList NodeList {get; set;}

Property Value

An XmlNodeList object.

Remarks

You can set the NodeList property to your own XmlNodeList object without setting the FileURL or RecordsetPattern.  This can be useful in subreports where the parent report sets the NodeList of the subreport data source from one of its fields (returned from the Field method as an XmlNodeList).

Example

Paste into the Detail Format event.
C#Copy Code
GrapeCity.ActiveReports.Data.XMLDataSource xDS = new GrapeCity.ActiveReports.Data.XMLDataSource();
SectionReport1 rpt = new SectionReport1();

    xDS.ValidateOnParse = true;
    xDS.FileURL = System.Windows.Forms.Application.StartupPath + " \\customer.xml";
    xDS.RecordsetPattern = "//ITEM";
    xDS.NodeList = (System.Xml.XmlNodeList)ds.Field("ITEM",true);
    this.Label1.Text = xDS.CurrentPosition;
    Console.WriteLine(xDS.Count.ToString());

    if (xDS.BOF && xDS.EOF)
    {
        return;
    }
Paste into the Detail Format event.
Visual BasicCopy Code
Dim xDS As New GrapeCity.ActiveReports.Data.XMLDataSource()
Dim rpt As New SectionReport1()

    xDS.ValidateOnParse = True
    xDS.FileURL = System.Windows.Forms.Application.StartupPath + " \\customer.xml"
    xDS.RecordsetPattern = "//ITEM"
    xDS.NodeList = xDS.Field("ITEM", True)
    Me.Label1.Text = xDS.CurrentPosition
    Console.WriteLine(xDS.Count.ToString())

    If xDS.BOF & xDS.EOF Then
        Exit Sub
    End If

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also