Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
Sets a xml node.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
XML | 7.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
XML | The XML to process. Can be XML as text or the reference returned by XML.Parse function, so you can make several times changes to the XML without parsing it each time. |
"<test>Hello</test>" |
Path | The path to the node or attribute to query. | "name" |
Flags | Various Flags. Add 1 to ignore errors in xml and continue parsing. This may lead to not everything in the xml being read. Add 4 to format returned XML. Add 32 to return result as XML. |
0 |
Value | The new value for node or attribute. This is for passing text to be used in XML and encoded properly. If you pass new value as XML, please use XML.SetPathXML instead!. |
"Hello" |
Returns XML, OK or error.
Add a first name:
MBS( "XML.SetPathValue"; "<person/>"; "person.firstName"; 0; "Joe" )
Example result:
"<?xml version="1.0" encoding="UTF-8"?>
<person><firstName>Joe</firstName></person>"
Add id attribute:
MBS( "XML.SetPathValue"; "<person/>"; "person#id"; 0; "123" )
Example result:
"<?xml version="1.0" encoding="UTF-8"?>
<person id="123"/>"
Adds a new name node with href number.
MBS( "XML.SetPathValue"; "<person></person>"; "person.name href=\"10.00\"" ; 4 ; "" )
Example result:
"<?xml version="1.0" encoding="UTF-8"?>
<person>
<name href="10.00"/>
</person>"
Created 16th September 2017, last changed 14th April 2021
XML.SetPathCData - XML.SetPathXML
Feedback: Report problem or ask question.