XML
Open XML documents and XSD schemas as a diagram, and link several XSD files into one.
Paste XML or open a .xml or .xsd file. Every element becomes a node, and its attributes and simple child elements become rows.
Example
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<price>44.95</price>
</book>
<book id="bk102">
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
<price>5.95</price>
</book>
</catalog>Open an XML example in the editor
How XML is drawn
- An attribute is shown as a row whose name starts with
$, soid="bk101"reads$id: bk101. - Elements that repeat, such as the two
bookelements above, become a list. - Numbers,
trueandfalseare read by type.
XSD linking
A schema is often split over several .xsd files that refer to each other's types. Link the files and the main one shows a single diagram, with the references between files drawn as edges.
- Open each
.xsdfile in its own tab. - Click the tab of the main schema, so it is the active tab.
- Right-click another XSD tab and choose Link to followed by the name of the main tab.
Linked tabs get the same color. To undo it, right-click the tab again and choose Unlink from.
Example
company.xsd (main)
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Company">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="founded" type="xs:date"/>
<xs:element name="department" type="Department"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="Department">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="budget" type="xs:decimal"/>
<xs:element name="lead" type="Employee"/>
</xs:sequence>
</xs:complexType>
</xs:schema>employees.xsd (linked)
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="Employee">
<xs:sequence>
<xs:element name="employeeId" type="xs:string"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="role" type="xs:string"/>
<xs:element name="address" type="Address"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Address">
<xs:sequence>
<xs:element name="street" type="xs:string"/>
<xs:element name="city" type="xs:string"/>
<xs:element name="zip" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>With employees.xsd linked, the diagram of company.xsd also shows Employee and Address, and the reference from Department to Employee is drawn as an edge.