Instructions:
- Get NSIS.
- Copy nsisXML.dll to Plugins and nsisXML.nsh to include directories
- Read this readme and example files.
Notes:
- The plugin uses msxml2. I know this can be headache, but is fully stable.
- The secret is to use XPATH to locate an element in the xml file and add, edit, create and remove (future) information.
- Don't like your xml tree style? Did you try tidy?
Functions:
| ==[Build]== |
| Displays the build version of the plugin. |
| Example: ${nsisXML->Build} ${VAR_RET} |
| ==[xPath]== |
| Uses xPath syntax to parse and get strings from elements or attributes values. |
| Example: ${nsisXML->xPath} "PATH_OF_XML_FILE" "XPATH_INSTRUCTION" ${VAR_RET} |
| ==[Create]== |
| Creates, in memory, the template of the xml file. | Example: ${nsisXML->Create} |
| ==[CreateElement]== |
| Let's you create a xml element, from the parent document or from another node. Note: use "XPATH_INSTRUCTION" to locate a node where to put the new element; empty param means the element will be as the first child. |
| Example: ${nsisXML->CreateElement} "XPATH_INSTRUCTION" "STRING_ELEMENT" |
| ==[CreateComment]== |
| Creates a comment after an element. |
| Example: ${nsisXML->CreateComment} "XPATH_INSTRUCTION" "STRING_COMMENT" |
| ==[SetElementAttr]== |
| Adds an attribute and its value to an element. |
| Example: ${nsisXML->SetElementAttr} "XPATH_INSTRUCTION" "Attribute" "Value" |
| ==[SetElementText]== |
| Sets the text for an element. |
| Example: ${nsisXML->SetElementText} "XPATH_INSTRUCTION" "STRING_TEXT" |
| ==[Display]== | Shows in a MessageBox How's your xml tree going. |
| Example: ${nsisXML->Display} |
| ==[Release]== |
| Frees the memory from the xml template and save the xml into a file. |
| Example: ${nsisXML->Release} "PATH_OF_XML_FILE" |
| ==[OpenXML]== | Opens a xml file. | Example: ${nsisXML->OpenXML} "PATH_OF_XML_FILE" |
| ==[LoadXML]== |
| Loads a xml string tree |
| Example: ${nsisXML->LoadXML} "PATH_OF_THE_FUTURE_XML_FILE" "XML_STRING_TREE" |
| ==[CloseXML]== |
| Closes 'OpenXML' or 'LoadXML' functions and saves the updates made to the file. |
| Example: ${nsisXML->CloseXML} |
| ==[xml]== |
| Dump in a output var, the xml tree. |
| Example: ${nsisXML->xml} ${VAR_RET} |
| ==[removeChild]== |
| Remove an element, upon of the selected index of the node that have it. |
| Example: ${nsisXML->removeChild} "XPATH_INSTRUCTION" "index_of_the_child_to_remove" |