This shows you the differences between two versions of the page.
xml_adaptor [2024/01/29 08:26] montse |
xml_adaptor [2024/12/10 13:03] (current) montse [Predefined Functions] |
||
---|---|---|---|
Line 5: | Line 5: | ||
===== Initilization Parameters ===== | ===== Initilization Parameters ===== | ||
- | * ** FilePath:** Complete path of the file | + | * ** FilePath:** complete path of the file |
- | ===== Predefined Functions (PF): ===== | + | ===== Predefined functions ===== |
| | ||
- | * **generateFileAsEvidence()**: The function generates a copy of the XML file in that moment, to be added as evidence. It does not require input parameters. | + | * **generateFileAsEvidence()**: the function generates a copy of the XML file in that moment, to be added as evidence. It does not require input parameters. |
- | * **getElementAttrTextByXPath(XPath,Attribute Name)**: Returns element attribute text, searching by XPath and attribute name. | + | * **getElementAttrTextByXPath(XPath,Attribute Name)**: returns element attribute text, searching by XPath and attribute name. |
- | * **getElementTextByTagName(Tag Name, Position)**: Returns element text, searching by Tag name and Position. | + | * **getElementTextByTagName(Tag Name, Position)**: returns element text, searching by Tag name and Position. |
- | * **getElementTextByXPath(XPath, Position)**: Returns element text, searching by XPath and Position. | + | * **getElementTextByXPath(XPath, Position)**: returns element text, searching by XPath and Position. |
- | * **getElementsCountByTagName(Tag Name)**: Returns the number of occurrences of the element, searching by Tag name. | + | * **getElementsCountByTagName(Tag Name)**: returns the number of occurrences of the element, searching by Tag name. |
- | * **getElementsCountByXPath(XPath)**: Returns the number of occurrences of the element, searching by XPath. | + | * **getElementsCountByXPath(XPath)**: returns the number of occurrences of the element, searching by XPath. |
- | * **getElementsTextByTagName(Tag Name)**: Returns Array string of elements text, searching by Tag name. | + | * **getElementsTextByTagName(Tag Name)**: returns array string of elements text, searching by Tag name. |
- | * **getElementsTextByXPath(XPath)**: Returns Array string of elements text, searching by XPath. | + | * **getElementsTextByXPath(XPath)**: returns array string of elements text, searching by XPath. |
- | * **replaceElementAttrTextByXPath**: Replaces the element attribute text, searching by Xpath and attribute name. | + | * **replaceElementAttrTextByXPath**: replaces the element attribute text, searching by Xpath and attribute name. |
- | * **replaceElementTextByTagName(Tag Name, Position, New Text)**: Replaces the Element´s text, searching by Tag Name and Position. | + | * **replaceElementTextByTagName(Tag Name, Position, New Text)**: replaces the element's text, searching by Tag Name and Position. |
- | * **replaceElementTextByXPath**: Replaces the element text, searching by Xpath and Position. | + | * **replaceElementTextByXPath**: replaces the element text, searching by Xpath and Position. |
- | * **saveAs**: Saves XML to the user path. Saves to the log folder if the path is not specified. | + | * **saveAs**: saves XML to the user path. Saves to the log folder if the path is not specified. |
- | * **saveXML()**: Saves the .xml file in the original path. | + | * **saveXML()**: saves the .xml file in the original path. |
- | * **xmlToString**: Save XML from the application memory to a String. | + | * **xmlToString**: saves XML from the application memory to a String. |