User Tools

Site Tools


en:xml_adaptor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:xml_adaptor [2023/05/08 12:44]
montse [Predefined Functions (PF):]
— (current)
Line 1: Line 1:
-====== XML Adaptor ====== 
-===== Introduction ===== 
-XML adaptor allow you to interact with a .xml file, offering a set of Predefined Functions so that you can retrieve, check and modify the content of the file. It also allows to save the modified document. 
- 
-===== Initialization Parameters ===== 
- 
-  * ** FilePath:** Complete path of the file 
- 
-===== Predefined Functions (PF): ===== 
- 
- 
-  * **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. 
- 
-  * **getElementTextByTagName(Tag Name, Position)**:​ Returns element text, searching by Tag name 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. 
- 
-  * **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. 
- 
-  * **getElementsTextByXPath(XPath)**:​ Returns Array string of elements text, searching by XPath. 
- 
-  * **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. 
- 
-  * **replaceElementTextByXPath**:​ Replaces the element text, searching by Xpath and Position. 
- 
-  * **saveAs**: Saves XML to the user path. Saves to the log folder if no path is specified. 
- 
-  * **saveXML()**:​ Saves the .xml file in the original path. 
- 
-  * **xmlToString**:​ Save XML from the application memory to a String. 
  
en/xml_adaptor.1683549880.txt.gz · Last modified: 2023/05/08 12:44 by montse