Accessing Data : Connecting to an XML file
 
Connecting to an XML file
XML is an open specification recommended by the World Wide Web Consortium, and has become a common mechanism for sharing structured data across different information systems. The XML document that a report accesses must be well-formed. To be well-formed, it must conform to the XML 1.0, third edition specification. You can find more information about this specification at the following URL:
http://www.w3.org/TR/REC-xml/
When creating an XML data source in BIRT, you specify the location of the XML file. You can also specify the location of an XML schema. An XML schema contains a set of rules to which an XML file conforms. You can use the schema to validate the XML file.
How to specify the connection information for accessing an XML file
1 In Data Explorer, right-click Data Sources, then choose New Data Source.
2 In New Data Source, supply the following information:
1 Select XML Data Source from the list of data source types.
2 In Data Source Name, type a name for the data source.
3 Choose Next.
New XML Data Source Profile appears, as shown in Figure 4‑64.
Figure 4‑64 Defining XML source and schema information
3 Specify the following connection information:
1 In the first field, type the location of the XML file, or choose Browse to navigate to and select the file.
2 In the second field, type the location of the schema file, if one is available, or choose Browse to navigate to and select the file. A schema is not required.
3 Select the type of encoding for the XML file and schema. Use Auto to specify that the data source detect the encoding type specified in the XML file or schema.
4 Choose Finish. The new XML data source appears under Data Sources in Data Explorer.