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 ( Namo Web Editor mark xml element Working with XML elements ). The title and author elements each contain text content, represented by child text nodes ( Namo Web Editor mark xml text Working with XML elements ).

Namo Web Editor 8.xml.elements.1 Working with XML elements

Namo Web Editor icon reveal Working with XML elementsTo edit an element’s text content
  • Double-click its child text node.
Namo Web Editor icon reveal Working with XML elementsTo add text content to an element
  1. Right-click the element node, point to Insert Node, and then click Text.
  2. Enter the text and then click OK.
Namo Web Editor icon reveal Working with XML elementsTo rename an element
  1. Double-click the element node.
  2. Enter the new name in the Name box. (Click the triangle to select one of the element names in use in the document.)
Namo Web Editor icon reveal Working with XML elementsTo add an element
  1. Right-click the intended parent node of the new element, point to Insert Node, and then click Element.
  2. 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.)
Namo Web Editor icon reveal Working with XML elementsTo remove a node
  1. Click the node and press Delete.
Namo Web Editor icon reveal Working with XML elementsTo move a node
  1. 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.)
Namo Web Editor icon reveal Working with XML elementsTo copy a node
  1. Right-click the node and click Clone Node.
  2. Specify the number of copies you want and whether to also copy the node’s contents and/or children, and then click OK.
Namo Web Editor icon reveal Working with XML elementsTo add a CDATA section to an element
  1. Right-click the element node, point to Insert Node, and then click CDATA.
  2. Enter the CDATA text and then click OK.
Namo Web Editor icon reveal Working with XML elementsTo add an entity reference section to an element
  1. Right-click the element node, point to Insert Node, and then click Entity Reference.
  2. Enter the entity name and then click OK.
Namo Web Editor icon reveal Working with XML elementsTo add a processing instruction to an element
  1. Right-click the element node, point to Insert Node, and then click Processing Instruction.
  2. Enter the processing instruction and then click OK.
Namo Web Editor icon reveal Working with XML elementsTo add a comment to an element
  1. Right-click the element node, point to Insert Node, and then click Comment.
  2. Enter the comment and then click OK.
Related topics

Working with XML attributes

Working with XML elements