See Also

XMLDataSource Class  | XMLDataSource Members

Language

Visual Basic

C#

Show All

See Also Languages ActiveReports Send feedback to Data Dynamics

NodeList Property

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

[Visual Basic]
Public Property NodeList As XmlNodeList
[C#]
public XmlNodeList NodeList {get; set;}

Return Type

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

[C#] 

private void Detail_Format(object sender, System.EventArgs eArgs) 

    DataDynamics.ActiveReports.DataSources.XMLDataSource xDS = new DataDynamics.ActiveReports.DataSources.XMLDataSource(); 
    ActiveReport1 rpt = new ActiveReport1(); 
 
    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; 
    } 
}

[Visual Basic] 

Private Sub Detail_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail.Format
    Dim xDS As New DataDynamics.ActiveReports.DataSources.XMLDataSource()
    Dim rpt As New ActiveReport1()

    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

End Sub

See Also

XMLDataSource Class  | XMLDataSource Members

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.