Reportizer Documentation
Contents Index

Opening XML Files

In Reportizer Opening Data Source dialog, there are two ways to open XML files:

1. Opening through connection string. Select ADO interface, then choose Connection string option and write a connection string. Use this way if some ODBC driver for XML is installed.

2. Opening by specifying file name. Select ADO interface, then choose File option and then browse for the needed file.

When building a connection string based on ODBC diver, please make sure the driver installed and the bit-version of it matches the bit-version of the application (32 or 64).
If you chose opening by specifying file name, Reportizer first tries to find an appropriate driver for it. If the driver not found or if it failed to open the file, it tries to open it as ADODB.Recordset object. In the last case, the XML file must contain a record set and must conform W3C XML-Data specification.
Here is an example of supported XML file:
<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
	xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
	xmlns:rs='urn:schemas-microsoft-com:rowset'
	xmlns:z='#RowsetSchema'>
<s:Schema id='RowsetSchema'>
	<s:ElementType name='row' content='eltOnly'>
		<s:AttributeType name='ID' rs:number='1' rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='float' dt:maxLength='8' rs:precision='15' rs:fixedlength='true'/>
		</s:AttributeType>
		<s:AttributeType name='FIRSTNAME' rs:number='2' rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='12'/>
		</s:AttributeType>
		<s:AttributeType name='LASTNAME' rs:number='3' rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='16'/>
		</s:AttributeType>
		<s:AttributeType name='CITY' rs:number='4' rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='16'/>
		</s:AttributeType>
		<s:AttributeType name='COUNTRY' rs:number='5' rs:nullable='true' rs:writeunknown='true'>
			<s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='16'/>
		</s:AttributeType>
		<s:extends type='rs:rowbase'/>
	</s:ElementType>
</s:Schema>
<rs:data>
	<z:row ID='1' FIRSTNAME='Sandra' LASTNAME='Bush' CITY='Portland' COUNTRY='United States'/>
	<z:row ID='2' FIRSTNAME='Eric' LASTNAME='Miles' CITY='Edmonton' COUNTRY='Canada'/>
	<z:row ID='3' FIRSTNAME='Berndt' LASTNAME='Mann' CITY='Hamburg' COUNTRY='Germany'/>
	<z:row ID='4' FIRSTNAME='Marek' LASTNAME='Przybylsky' CITY='Krakow' COUNTRY='Poland'/>
	<z:row ID='5' FIRSTNAME='John' LASTNAME='Hladni' CITY='Bedford' COUNTRY='United States'/>
	<z:row ID='6' FIRSTNAME='Bogdan' LASTNAME='Vovchenko' CITY='Kyiv' COUNTRY='Ukraine'/>
	<z:row ID='7' FIRSTNAME='Paul' LASTNAME='Vogel' CITY='Hamburg' COUNTRY='Germany'/>
	<z:row ID='8' FIRSTNAME='Ion' LASTNAME='Rotaru' CITY='Kishinev' COUNTRY='Moldova'/>
	<z:row ID='9' FIRSTNAME='Mehmed' LASTNAME='Rabbani' CITY='Liege' COUNTRY='Belgium'/>
	<z:row ID='10' FIRSTNAME='Rita' LASTNAME='Hagen' CITY='Vienna' COUNTRY='Austria'/>
	<z:row ID='11' FIRSTNAME='Andreas' LASTNAME='Muller' CITY='Berlin' COUNTRY='Germany'/>
	<z:row ID='12' FIRSTNAME='Hans' LASTNAME='Petersen' CITY='Copenhagen' COUNTRY='Denmark'/>
	<z:row ID='13' FIRSTNAME='Shimon' LASTNAME='Rabinovich' CITY='Tel Aviv' COUNTRY='Israel'/>
	<z:row ID='14' FIRSTNAME='Rick' LASTNAME='Yonley' CITY='Miami' COUNTRY='United States'/>
	<z:row ID='15' FIRSTNAME='Jose' LASTNAME='Pereira' CITY='Madrid' COUNTRY='Spain'/>
</rs:data>
</xml>