Skip to content

Commit 955f11f

Browse files
author
livecodesam
authored
[[ Bug-14941 ]] Correct XML Function References in User Guide (livecode#7430)
Corrected various references to revXML functions that incorrectly did not start with `revXML`.
1 parent 768af47 commit 955f11f

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

docs/guides/Processing Text and Data.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,16 +1064,16 @@ This section discusses using the XML library in detail.
10641064

10651065
In order to work with an XML document, you start by creating an XML tree
10661066
of that document in memory. There are two functions
1067-
**revCreateXMLTreeFromFile** and **revCreateXMLTree**. Use the former to
1067+
**revXMLCreateTreeFromFile** and **revXMLCreateTree**. Use the former to
10681068
load XML document from a file and create a tree in memory, use the
10691069
latter to create an XML tree from another data source such as a
10701070
variable, field or download.
10711071

1072-
revCreateXMLTree(XMLText, dontParseBadData, createTree, sendMessages)
1073-
revCreateXMLTreeFromFile(filePath, dontParseBadData, createTree, sendMessages)
1072+
revXMLCreateTree(XMLText, dontParseBadData, createTree, sendMessages)
1073+
revXMLCreateTreeFromFile(filePath, dontParseBadData, createTree, sendMessages)
10741074

1075-
In **revCreateXMLTree** the *XMLText*is the string containing the XML.
1076-
In **revCreateXMLTreeFromFile** this parameter is replaced with the
1075+
In **revXMLCreateTree** the *XMLText*is the string containing the XML.
1076+
In **revXMLCreateTreeFromFile** this parameter is replaced with the
10771077
*filePath* – the file path to the XML document. Both functions return a
10781078
single value – the ID of the tree that has been created.
10791079

@@ -1113,7 +1113,7 @@ information from within the tree.
11131113
> **Note:** All the examples in this section assume that we have loaded
11141114
> the XML tree depicted in the figure below – XML Tree Representation of a
11151115
> Stack, above. We assume that you have loaded this tree using the
1116-
> `revCreateXMLTree`function described above, and that this function has
1116+
> `revXMLCreateTree`function described above, and that this function has
11171117
> returned a value of 1 as the ID of the tree.
11181118
11191119
**Retrieving the Root Node**
@@ -1458,8 +1458,8 @@ more information on this function, see the *LiveCode Dictionary*.
14581458

14591459
**Removing an XML Tree from Memory**
14601460

1461-
To remove an XML tree from memory, use **revDeleteXMLTree**. To remove
1462-
all XML trees from memory, use **revDeleteAllXMLTrees**. Both functions
1461+
To remove an XML tree from memory, use **revXMLDeleteTree**. To remove
1462+
all XML trees from memory, use **revXMLDeleteAllTrees**. Both functions
14631463
take a single parameter – the ID of the tree to be deleted. You should
14641464
delete a tree when you have stopped using it. For more information on
14651465
these functions, see the *LiveCode Dictionary*.
@@ -1476,9 +1476,9 @@ unloading XML.
14761476

14771477
**Adding a new Child Node**
14781478

1479-
To add a new node use the **revAddXMLNode** command.
1479+
To add a new node use the **revXMLAddNode** command.
14801480

1481-
revAddXMLNode treeID, parentNode, nodeName, nodeContents, [location]
1481+
revXMLAddNode treeID, parentNode, nodeName, nodeContents, [location]
14821482

14831483

14841484
See above for an explanation of *treeID*.
@@ -1494,7 +1494,7 @@ start of the child nodes.
14941494

14951495
Use this function to add a button to our example XML file as follows:
14961496

1497-
revAddXMLNode 1, "/stackFile/stack/card/", "button", ""
1497+
revXMLAddNode 1, "/stackFile/stack/card/", "button", ""
14981498

14991499
This results in our tree containing a new button:
15001500

@@ -1525,23 +1525,23 @@ This results in our tree containing a new button:
15251525
</stackFile>
15261526

15271527
To create another node at the same level as another node, use the
1528-
**revInsertXMLNode** command instead.
1528+
**revXMLInsertNode** command instead.
15291529

15301530
**Appending XML to a tree**
15311531

1532-
To add a new node use the **revAppendXML** command.
1532+
To add a new node use the **revXMLAppend** command.
15331533

1534-
revAppendXML treeID, parentNode, newXML
1534+
revXMLAppend treeID, parentNode, newXML
15351535

15361536
See above for an explanation of *treeID* and *parentNode*.
15371537

15381538
The *newXML* is XML you want to append to the tree.
15391539

15401540
**Moving, Copying or Deleting a Node**
15411541

1542-
To move a node use the **revMoveXMLNode** command.
1542+
To move a node use the **revXMLMoveNode** command.
15431543

1544-
revMoveXMLNode treeID, sourceNode, destinationNode [, location] [, relationship]
1544+
revXMLMoveNode treeID, sourceNode, destinationNode [, location] [, relationship]
15451545

15461546
See above for an explanation of *treeID*.
15471547

@@ -1556,25 +1556,25 @@ The *relationship* allows you to specify whether to place the node
15561556
alongside the destination as a sibling or below the destination as a
15571557
child.
15581558

1559-
To copy a node use **revCopyXMLNode**.
1559+
To copy a node use **revXMLCopyNode**.
15601560

1561-
To delete a node use **revDeleteXMLNode**.
1561+
To delete a node use **revXMLDeleteNode**.
15621562

15631563
**Putting data into a Node**
15641564

1565-
To put data into a node use the **revPutIntoXMLNode** command.
1565+
To put data into a node use the **revXMLPutIntoNode** command.
15661566

1567-
revPutIntoXMLNode treeID,node,newContents
1567+
revXMLPutIntoNode treeID,node,newContents
15681568

15691569
See above for an explanation of *treeID* and *node*.
15701570

15711571
The *newContents* is the text that the new node will contain.
15721572

15731573
**Setting an Attribute**
15741574

1575-
To set an attribute use the **revSetXMLAttribute** command.
1575+
To set an attribute use the **revXMLSetAttribute** command.
15761576

1577-
revSetXMLAttribute treeID,node,attributeName,newValue
1577+
revXMLSetAttribute treeID,node,attributeName,newValue
15781578

15791579
See above for an explanation of *treeID* and *node*.
15801580

@@ -1585,7 +1585,7 @@ The *newValue* is the value to set for the attribute.
15851585

15861586
Using this function to add a "showBorder" property to our field:
15871587

1588-
revSetXMLAttribute 1, "/stackFile/stack/card/button", "showBorder","true"
1588+
revXMLSetAttribute 1, "/stackFile/stack/card/button", "showBorder","true"
15891589

15901590
The field tag in our tree now looks like this:
15911591

docs/notes/bugfix-14941.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Corrected XML function references in the User Guide

0 commit comments

Comments
 (0)