HomeActive Query BuilderMetadata XML Format

Metadata XML Format


Is there any documentation available for how the XML metadata should be formatted? I'm trying to create metadata XML files for importing into the activex control at runtime, but am getting errors. "Error parsing XML: Invalid at the top level of the document."

This is what I've got so far - a fairly simple example that mirrors the schema used in the "CS2005NonVisual" demo project. Anyone see what's wrong?

<pre>

-----------------------------------------------

<?xml version="1.0" encoding="utf-8"?>
<metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.activequerybuilder.com/schemas/metadata.xsd">
<table>
<database>
<item name="MyDB" case_sens="0" />
</database>
<schema name="MySchema" case_sens="0" />
<name name="Orders" case_sens="0" />
<system>0</system>
<visible>1</visible>
<fields>
<field>
<name>OrderID</name>
<type>0</type>
</field>
<field>
<name>CustomerID</name>
<type>0</type>
</field>
<field>
<name>Total</name>
<type>0</type>
</field>
<field>
<name>OtherData</name>
<type>0</type>
</field>
</fields>
</table>
<table>
<database>
<item name="MyDB" case_sens="0" />
</database>
<schema name="MySchema" case_sens="0" />
<name name="Customers" case_sens="0" />
<system>0</system>
<visible>1</visible>
<fields>
<field>
<name>CustomerID</name>
<type>0</type>
</field>
<field>
<name>FullName</name>
<type>0</type>
</field>
<field>
<name>Address</name>
<type>0</type>
</field>
</fields>
<relations>
<relation>
<key_fields>
<field_name>
<item name="CustomerID" case_sens="0" />
</field_name>
</key_fields>
<child_database>
<item name="MyDB" case_sens="0" />
</child_database>
<child_schema name="MySchema" case_sens="0" />
<child_name name="Orders" case_sens="0" />
<child_fields>
<field_name>
<item name="CustomerID" case_sens="0" />
</field_name>
</child_fields>
</relation>
</relations>
</table>
</metadata>

---------------------------------------

</pre>
Gordon | email
July 8 2008, 09:59 AM
Dear Gordon,

Field names are formed incorrectly. your should write:

<field>
<name>
<item name="CustomerID" case_sens="0"/>
</name>
<type>0</type>
</field>

instead of:

<field>
<name>CustomerID</name>
<type>0</type>
</field>

The rest is fine.

An example of the XML file could be found in the Active Query Builder .NET installation directory (Northwind.xml).

Sergey.
Sergey Smagin | email
20 hours, 10 mins since original post
This topic is closed