xinsert node-type expression [namespace expression] location xpath
Use the expression to create a new node of a given node-type in the location relative to the given xpath.
For element nodes, the format of the expression should look like "<element-name att-name='attvalue' ...>". The < and > characters are optional. If no attributes are used, the expression may simply consist the element name. Note, that in the first case, the quotes are required since the expression contains spaces.
Attribute nodes use the following syntax: "att-name='attvalue' [...]".
For the other types of nodes (text, cdata, comments) the expression should contain the node's literal content. Again, it is necessary to quote all whitespace and special characters as in any expression argument.
The location argument should be one of: after, before, into, replace, append or prepend. See documentation of the location argument type for more detail.
The namespace expression is only valid for elements and attributes and must evaluate to the namespace URI. In that case, the element or attribute name must have a prefix. The created node is associated with a given namespace.