【RF库XML测试】Add Element

Name:
Add Element
Source:
XML <test library>
Arguments:
[ source | element | index=None | xpath=. ]
Adds a child element to the specified element.
The element to whom to add the new element is specified using `source` and `xpath`. They have exactly the same semantics as with `Get Element` keyword. The given `source` structure is modified and also returned.
The `element` to add can be specified as a path to an XML file or as a string containing XML, or it can be an already parsed XML element. The element is copied before adding so modifying either the original or the added element has no effect on the other . The element is added as the last child by default, but a custom index can be used to alter the position. Indices start from zero (0 = first position, 1 = second position, etc.), and negative numbers refer to positions at the end (-1 = second last position, -2 = third last, etc.).

 

posted @ 2017-06-27 23:39  垄上行  阅读(285)  评论(0编辑  收藏  举报