Active Query Builder support area

Error when loading XML file

Avatar
  • updated
  • Completed

Hello,

I try to concentrate my users on only a few of the tables of my database and threrefor I want to load these tables from an xml file. I use the Delphi VCL edition. Everytime when loading

acQueryBuilder1.MetadataContainer.LoadFromXML('c:\temp\dummy.xml');

I get an error "Error parsing XML: Ungültig auf der obersten Ebene im Dokument." German - means something like "... invalid on highest level / root level of document"

I get this error even if the two commands before work fine:

acQueryBuilder1.RefreshMetadata; // loads the tables, metadata from the database connected
acQueryBuilder1.MetadataContainer.SaveToXMLFile('c:\temp\dummy.xml'); // the file looks fine
acQueryBuilder1.MetadataContainer.LoadFromXML('c:\temp\dummy.xml'); // error here

What do I do wrong?

Regards

Harald

Avatar
Sergey Kraikov

Hello Harald,

unfortunately I cannot reproduce this issue.
Could you please send me your "dummy.xml" for investigation?

Avatar
HSchmid

Hello Sergey,

thank You for Your support! Maybe it's a problem of my system? I'm using Win7Pro and Delphi Pro 10.1 Berlin (without update).

Appended is the dummy.xml.

Regards

Harald

dummy.xml

Avatar
Sergey Kraikov

Hello Harald,

I just realised you using LoadFromXML instead of LoadFromXMLFile.
The difference between these two methods is the first get an XML string,
but the second accept a file name to load from.

I just tested your dummy.xml with LoadFromXMLFile - it works fine.

Avatar
HSchmid

Hello Sergey,

thank You very much! It works fine now :-) Great support!

Regards
Harald