Comments and Processing Instructions
Comments and Processing Instructions can be inserted into target XML components. Processing instructions are used to pass information to applications that further process XML documents. Note that Comments and Processing instructions cannot be defined for nodes that are part of a copy-all mapped group.
To insert a Processing Instruction:
|1.||Right-click an element in the target component and select Comment/Processing Instruction, then one of the Processing Instruction options from the menu (Before, After)|
|2.||Enter the Processing Instruction (target) name in the dialog and press OK to confirm, e.g. xml-stylesheet. This adds a node of this name to the component tree.|
|3.||You can use, for example, a constant component to supply the value of the Processing Instruction attribute, e.g. href="book.css" type="text/css".|
|Note:||Multiple Processing Instructions can be added before or after any element in the target component.|
To insert a comment:
|1.||Right-click an element in the target component and select Comment/Processing Instruction, then one of the Comment options from the menu (Before, After).|
This adds the comment node ( <!--comment() ) to the component tree.
|2.||Use a constant component to supply the comment text, or connect a source node to the comment node.|
|Note:||Only one comment can be added before and after a single target node. To create multiple comments, use the duplicate input function.|
To delete a Comment/Processing Instruction:
•Right-click the respective node, select Comment/Processing Instruction, then select Delete Comment/Processing Instruction from the flyout menu.