The XML builder works from any physical XML file or in-memory XML data that can be automatically built using an external component, the input XML data being based on the XMLBuilderDiagram XML Schema definition file in both cases. For a diagram template based on the XML builder, the names of the schematic feature classes associated with that diagram template must match the values specified for the <FeatureClassName> items related to each NodeFeature, LinkFeature, NodeOnLinkFeature, and SubLinkFeature type found in the input XML data.
The XML builder generation process
When generating a diagram based on the XML builder, the builder populates the schematic feature classes—that is, it creates the schematic features expected in the diagram as follows:
- For each NodeFeature, LinkFeature, NodeOnLinkFeature, and SubLinkFeature item found in the input XML data, it verifies that a schematic feature class whose name matches the value specified for its <FeatureClassName> tag exists for the diagram template.
If there is such a schematic feature class for the diagram template, it creates the schematic feature associated with the XML item in memory, imports the values from all input XML tags to the expected schematic attributes, and initializes the topology and geometry.
- If schematic rules are specified for the related diagram template, they are executed on all the schematic features built in memory.
- If there is a default schematic layout algorithm configured for the diagram template, the algorithm is executed and the geometry for all the in-memory schematic features is updated accordingly.
- All the schematic features in memory since the generation process started are saved in the schematic feature classes in the schematic dataset.
- All the created schematic features are queried from the schematic feature classes, and the diagram is displayed.
Then, at any time and for its lifetime—that is, until it is deleted from the schematic dataset—the diagram can be
- Reopened
- Edited, laid out, and saved
- Updated from an updated version of the input XML data so changes are reported on the diagram
Corresponding XML tags/schematic feature class fields
The tables below show to which field of the schematic feature class each possible tag found in the input XML data is migrated during the process. Tags and field names in bold are mandatory information in the input XML data:
- Information found for any type of XFeature
Tag in the input XML data Impacted field(s) in the schematic feature class <ExternalUniqueID>
SCHEMATICTID
<DatasourceName>
DATASOURCEID
<UCID>
UCID
<UOID>
UOID
<USID>
USID
<RelatedContainerID>
RELATIONOBJECTID and RELATIONCLASSID
Corresponding XML tags/schematic feature class fields for any XFeature type - Specific information found for NodeFeature item
Tag in the input XML data Impacted field(s) in the schematic feature class <InitialX>
INITIALX
<InitialY>
INITIALY
Corresponding XML tags/schematic feature class fields for NodeFeature type - Specific information found for LinkFeature item
Tag in the input XML data Impacted field(s) in the schematic feature class <FromNode>
FROMTID
<ToNode>
TOTID
<Vertices>
SHAPE
Corresponding XML tags/schematic feature class fields for any LinkFeature type - Specific information found for NodeOnLinkFeature item
Tag in the input XML data Impacted field(s) in the schematic feature class <InitialPosition>
INITIALPOSITION
<ReferenceLink>
REFERENCELINK
Corresponding XML tags/schematic feature class fields for NodeOnLinkFeature type - Specific information found for SubLinkFeature item
Tag in the input XML data Impacted field(s) in the schematic feature class <FromNode>
FROMTID
<ToNode>
TOTID
<ReferenceLink>
REFERENCELINK
Corresponding XML tags/schematic feature class fields for any SubLinkFeature type - Data in the <PropertySetProperty> tag
For data in the <PropertySetProperty> tag, either (1) a field whose name matched the <Key> value in the input XML data already exists in the schematic feature class and the related <Value> is stored in that field or (2) the <Value> is stored in a <Key> property set property created in the PROPERTYSET field during the process.