Error - Root element is missing


 Product(s):Promis.e, Bentley Substation
 Version(s):through 08.11.13.140
 Environment:N/A
 Area:Installation_Configuration
 Subarea:N/A

Error or Warning Message

A message including the phrase "Root element is missing" appears at startup or upon certain operations such as selecting a project in [[Project Manager]].

Internal Error
Error Message: Root element is missing.
TargetSite: Void Throw(System.Exception)
DeclaringType: System.Xml.XmlTextReaderImpl
Attributes: private
MemberType: Method

Some unhandled exception messages will include a Details area that includes text such as the following:

System.Xml.XmlException: Root element is missing.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)

Explanation

"Root element is missing" refers to missing items in XML code that is being read by the software.  Therefore it usually indicates a problem with an .XML file.  The software stores information in many different .XML files, so the key is finding which one is corrupt.

How to Avoid

First procedure to try

This procedure is usually helpful if the error occurs at startup.

  1. Close the software.

  2. Rename the [[5363|user application data folder for promis.e]] or the [[9815|user application data folder for Bentley Substation]] as the case may be.  This folder contains several .XML files.  It will be recreated when the software is restarted.

If the issue is project specific

  1. Compare the file size and/or contents of the ProjectOptions.xml file in the project's folder to those of known "good" projects.
  2. If the ProjectOptions.xml file is questionable or obviously bad, rename it and copy a good ProjectOptions.xml file into the project folder.  A file from a project that has the same project options configuration is ideal.  The seed/template project option file can also be copied and renamed to ProjectOptions.xml.

If the issue is specific to certain symbols, families or other catalog items

If the issue does not affect all users sharing the same catalog on the network

  1.     Close the software on the affected user's machine.
  2.     Delete the contents of the [[Catalog cache - promis.e|catalog cache]] folder.

If the catalog is not a network catalog or the issue affects all users

  1.     Open [[Catalog Manager]].
  2.     Right click the catalog containing the problem item(s) and select Rebuild.

It is recommended that all users sharing the catalog close their software when a network catalog is rebuilt.  One option is to rebuild a local copy of the catalog, then replace the network catalog with the rebuilt local catalog.

If that does not help

If the above procedures do not help, then it is a matter of isolating the offending item.  It may be some other .XML file, or XML code stored in a database.  For example, symbol, macro, and device family information is stored as XML code in the catalog.mdb file.  Device families are stored as .XML files themselves.  Page format information exists in the project database as XML code.

In some cases where the contents of the Program Data folder were on a network location or on a cloud content management system (e.g. Box), unsyncing and resyncing the folder resolved the issue.

 Original Author:Matt_P