Adding elements in XMLSpy
Every developer has his own unique working preferences, and every developer using XMLSpy probably creates documents using different features and tools. XMLSpy provides a variety of editing helpers and views so that each user can customize her XML editing experience. For instance, when you’re working on an XML instance document in text view or grid view, you can enter elements in the following way:
- Type the opening angle bracket, then type the element name. Once you type the closing bracket, XMLSpy enters the closing tag automatically, and you can simply continue typing to enter data between the tags. XMLSpy also inserts any mandatory sub-elements and attributes associated with the element you’ve selected.
- Type the opening angle bracket, and XMLSpy gives you a drop-down list of the permissible elements based on your location in the document. Simply arrow down or use your mouse to select the required element. To ensure well-formedness, XMLSpy enters the opening and closing element tags, and you can simply enter your data between them.
- XMLSpy presents a list of the permissible elements based on your location in the document in an entry-helper window (upper right-hand side of the UI). Simply double click the required element. XMLSpy inserts its opening and closing tags in your document, and you can type in the corresponding data. Or, you can highlight the data you need to surround with an element and double click the element name in the entry-helper window. XMLSpy automatically inserts the correct opening and closing element tags on each side of the data.
These are just a few of the ways developers save time and efficiently create valid, well-formed XML documents in XMLSpy. Similar entry helpers are available for working with all XML technologies, from XSD to XSLT to XQuery and beyond. Be on the lookout for future tips to learn more! Or, check out the help files included with XMLSpy.
If you are not already a XMLSpy user, you can download a free, 30-day trial to check out these features.