Jump to content

Component: XML JSON Parser (Runtime Tools): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable""
Line 62: Line 62:


===AddObject===
===AddObject===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 91: Line 91:


===BuildJSONString===
===BuildJSONString===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 105: Line 105:


===BuildXMLString===
===BuildXMLString===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 119: Line 119:


===ClearObjects===
===ClearObjects===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 133: Line 133:


===DeleteObject===
===DeleteObject===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 152: Line 152:


===FindNextObject===
===FindNextObject===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 171: Line 171:


===FindNextObjectString===
===FindNextObjectString===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 190: Line 190:


===FindObject===
===FindObject===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 209: Line 209:


===FindObjectString===
===FindObjectString===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 228: Line 228:


===GetObjectString===
===GetObjectString===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 247: Line 247:


===GetObjectTag===
===GetObjectTag===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 266: Line 266:


===GetRootHandle===
===GetRootHandle===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 280: Line 280:


===ParseJSONDataString===
===ParseJSONDataString===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 304: Line 304:


===ParseXMLDataString===
===ParseXMLDataString===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 328: Line 328:


===SetObjectString===
===SetObjectString===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 352: Line 352:


===SetObjectTag===
===SetObjectTag===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
Line 377: Line 377:
==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]

Revision as of 14:15, 13 July 2026

Author MatrixTSL
Version 1.0
Category Runtime Tools


XML JSON Parser component

A component designed to simplify the collection of data from XML and JSON sources. Parses the raw data and creates a dynamic representation of the data that is easy to navigate and interrogate. Also allows the objects to be manually created or edited and then re-exported as XML or JSON format.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_XMLParser.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_XMLParser.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples






Macro reference

AddObject

AddObject
Adds a tag at the selected location. Use the GetRootHandle and runtime API Tree functions . Returns the handle of the new object. 
- HANDLE ParentObject
The Object Handle to store the new tag inside 
- STRING Tag
Name of the object 
- STRING Data
data for the object (optional) 
- HANDLE Return


BuildJSONString

BuildJSONString
Generate a JSON string based on the current objects inside the component. 
- STRING Return


BuildXMLString

BuildXMLString
Generate a XML string based on the current objects inside the component. 
- STRING Return


ClearObjects

ClearObjects
Deletes all object data ready for fresh input 
- VOID Return


DeleteObject

DeleteObject
Deletes a selected tag object. 
- HANDLE Object
Handle to the object 
- BOOL Return


FindNextObject

FindNextObject
Finds the next instance of an object following a GetObject* call. Returns the first matching path from the last search. Returns 0 if the path was not found. 
- STRING SubObjPath
e.g. "item.title" 
- HANDLE Return


FindNextObjectString

FindNextObjectString
Searches for and then collects the data string from the specified path. Returns the first matching path from the last search 
- STRING SubObjPath
e.g. "item.title" 
- STRING Return


FindObject

FindObject
Finds the first instance of an object. Returns the first matching path from the root. Returns 0 if the path was not found. 
- STRING ObjPath
e.g. "rss.channel.title" 
- HANDLE Return


FindObjectString

FindObjectString
Searches for and then collects the data string from the specified path. Returns the first matching path from the root. 
- STRING ObjPath
e.g. "rss.channel.title" 
- STRING Return


GetObjectString

GetObjectString
Collects the data string from the specified object. 
- HANDLE Object
Handle to the object 
- STRING Return


GetObjectTag

GetObjectTag
Collects the tag string from the specified object. 
- HANDLE Object
Handle to the object 
- STRING Return


GetRootHandle

GetRootHandle
Allows for user to step through the objects manually using the inbuilt runtime api calls. 
- HANDLE Return


ParseJSONDataString

ParseJSONDataString
Parses JSON formatted data in a piecemeal format as and when file data is available. Creates objects to store the contents of the JSON  
- STRING Data
JSON Data string, can be a chunk of a file at a time 
- UINT Length
Number of Bytes to process 
- VOID Return


ParseXMLDataString

ParseXMLDataString
Parses XML formatted data in a piecemeal format as and when file data is available. Creates objects to store the contents of the XML. 
- STRING Data
XML Data string, can be a chunk of a file at a time 
- UINT Length
Number of bytes to process 
- VOID Return


SetObjectString

SetObjectString
Sets the data string of an existing object. 
- HANDLE Object
Handle to the object 
- STRING Data
 
- VOID Return


SetObjectTag

SetObjectTag
Sets the tag name of an existing object. 
- HANDLE Object
Handle to the object 
- STRING Tag
 
- VOID Return


Property reference

Properties