The XML | Add Child command, though enabled in all views, can be used in Grid View only. It opens a submenu (see screenshot) with which you can add the following child items to the currently selected element.
•The XML declaration and node types (Attribute, Element, Text, CDATA, Comment, Processing Instruction) in XML documents;
•DOCTYPE declarations and external DTD declarations in XML documents
•DTD declarations (ELEMENT, ATTLIST, ENTITY, and NOTATION) in DTD documents and internal DTD declarations of XML documents.