Show All
Working with XML elements
The example below shows five nodes in an XML document tree. The root element (“book”) and two of its child elements (“title” and “author”) are each represented by an element node ( ). The title and author elements each contain text content, represented by child text nodes ( ).
To edit an element’s text content
- Double-click its child text node.
To add text content to an element
- Right-click the element node, point to Insert Node, and then click Text.
- Enter the text and then click OK.
To rename an element
- Double-click the element node.
- Enter the new name in the Name box. (Click the triangle to select one of the element names in use in the document.)
To add an element
- Right-click the intended parent node of the new element, point to Insert Node, and then click Element.
- Enter the name of the new element in the Name box. (Click the triangle to select one of the element names in use in the document.)
To remove a node
- Click the node and press Delete.
To move a node
- Drag the node on top of another node. (If you hold down the Ctrl key while dragging, the dragged node will become a child of the node you drop it on. Otherwise, it will become its first preceding sibling.)
To copy a node
- Right-click the node and click Clone Node.
- Specify the number of copies you want and whether to also copy the node’s contents and/or children, and then click OK.
To add a CDATA section to an element
- Right-click the element node, point to Insert Node, and then click CDATA.
- Enter the CDATA text and then click OK.
To add an entity reference section to an element
- Right-click the element node, point to Insert Node, and then click Entity Reference.
- Enter the entity name and then click OK.
To add a processing instruction to an element
- Right-click the element node, point to Insert Node, and then click Processing Instruction.
- Enter the processing instruction and then click OK.
To add a comment to an element
- Right-click the element node, point to Insert Node, and then click Comment.
- Enter the comment and then click OK.