See Also

XMLDataSource Class  | XMLDataSource Members

Language

Visual Basic

C#

Show All

xmlFragment
Specifies a valid XML fragment string to be loaded into the XML document.
See Also Languages ActiveReports Send feedback to Data Dynamics

LoadXML Method

Loads an XML fragment from a string.

[Visual Basic]
Public Sub LoadXML( _    ByVal xmlFragment As String _ )
[C#]
public void LoadXML(    string xmlFragment );

Parameters

xmlFragment
Specifies a valid XML fragment string to be loaded into the XML document.

Remarks

The XML is parsed and used as the XML document source.

Example

[C#] 

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

    DataDynamics.ActiveReports.DataSources.XMLDataSource ds = new DataDynamics.ActiveReports.DataSources.XMLDataSource(); 
    ds.FileURL = null; 
    ds.RecordsetPattern = "//Customer"; 
    ds.LoadXML("<Order><Customer><Name>John Doe</Name><Cardnum>131 131 131 131</Cardnum><Manifest><Item><ID>204</ID><Title>Advanced VB</Title><Quantity>1</Quantity><UnitPrice>$10.75</UnitPrice></Item></Manifest><Receipt><Subtotal>$23.75</Subtotal><Tax>$2.43</Tax></Receipt></Customer></Order>"); 
}

[Visual Basic] 

Private Sub rptDD_ReportStart(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.ReportStart
    Dim ds As New DataDynamics.ActiveReports.DataSources.XMLDataSource
    ds.FileURL = Nothing
    ds.RecordsetPattern = "//Customer"
    ds.LoadXML("<Order>" & _
        "<Customer>" & _
        "<Name>John Doe</Name>" & _
        "<Cardnum>131 131 131 131</Cardnum>" & _
        "<Manifest>" & _
        "<Item>" & _
        "<ID>204</ID>" & _
        "<Title>Advanced VB</Title>" & _
        "<Quantity>1</Quantity>" & _
        "<UnitPrice>$10.75</UnitPrice>" & _
        "</Item>" & _
        "</Manifest>" & _
        "<Receipt>" & _
        "<Subtotal>$23.75</Subtotal>" & _
        "<Tax>$2.43</Tax>" & _
        "</Receipt>" & _
        "</Customer>" & _
        "</Order>")
End Sub

See Also

XMLDataSource Class  | XMLDataSource Members

 

 


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