CreateXMLNode()
语法
Result = CreateXMLNode(ParentNode, Name$ [, PreviousNode [, Type]])概要
Creates a new XML node and inserts it into the given parent node.
参数
ParentNode The node into which to insert the new node. To insert the new node at the root of the tree, RootXMLNode() can be used here. Name$ The node name$. Can be an empty string if the node name isn't required. PreviousNode (optional) A childnode of 'ParentNode' after which the new node should be inserted. If this value is 0 or not specified, the new node is inserted as the first child of its parent. If this value is -1, the node is inserted as the last child of its parent. Type (optional) The type for the new node. The default is #PB_XML_Normal. Note that the node type cannot be changed after the node was created.
返回值
The new XML node if it was created successfully or zero if no node could be inserted at this point.
Remarks
The following rules must be followed for a successful insertion:
- ParentNode may not be of type #PB_XML_Comment or #PB_XML_CData
- PreviousNode must be a direct child of ParentNode (if it is specified)
- A node of type #PB_XML_Root cannot be created manually
- If the XML tree already has a main node, only nodes other than #PB_XML_Normal and #PB_XML_CData can be inserted at the root level
参阅
DeleteXMLNode()
已支持操作系统
所有