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

From Flowcode Help
Jump to navigationJump to search
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| MatrixTSL
 
| MatrixTSL
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
+
| 1.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Runtime Tools
 
| 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.
  
==[[File:Component Icon f54fa744_5af4_4c08_bdb9_fb31848a2b63.png|Image]] XML JSON Parser component==
+
==Component Pack==
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.
 
  
==Examples==
+
FREE
  
===XML Example===
+
==Detailed description==
  
A simple example to read in an XML formatted file and extract data from the structure.
 
  
[[:File:XML_Example.zip]]
 
  
  
===JSON Example===
 
  
A simple example to read in an JSON formatted file and extract data from the structure.
 
  
[[:File:JSON_Example.zip]]
 
  
==Downloadable macro reference==
 
  
''This component does not contain any downloadable macros''
 
  
==Simulation macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>SetObjectString</tt></u></span>===
 
Sets the data string of an existing object.
 
  
'''Parameters'''
 
  
:[[Variable Types|HANDLE]] ''Object''
 
::Handle to the object
 
  
:[[Variable Types|<- STRING]] ''Data''
+
''No detailed description exists yet for this component''
::''This parameter may be returned back to the caller''
 
  
 +
==Examples==
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>FindObject</tt></u></span>===
 
Finds the first instance of an object.
 
  
Returns the first matching path from the root.
 
  
Returns 0 if the path was not found.
 
  
'''Parameters'''
 
  
:[[Variable Types|<- STRING]] ''ObjPath''
 
::e.g. "rss.channel.title"
 
::''This parameter may be returned back to the caller''
 
  
  
'''Return value'''
 
  
:[[Variable Types|HANDLE]]
 
  
  
===<span style="font-weight: normal;"><u><tt>GetRootHandle</tt></u></span>===
 
Allows for user to step through the objects manually using the inbuilt runtime api calls.
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
===XML Example===
  
 +
A simple example to read in an XML formatted file and extract data from the structure.
  
'''Return value'''
+
[[:File:XML_Example.zip]]
  
:[[Variable Types|HANDLE]]
 
  
 +
A simple example to read a HTML string into the XML parser and extract data from the within the table structure. The HTML string could be provided via a TCP client HTTP GET request.
  
===<span style="font-weight: normal;"><u><tt>FindObjectString</tt></u></span>===
+
{{fcfile|XML_HTML_Example.fcsx|XML HTML Example}}
Searches for and then collects the data string from the specified path.
 
  
Returns the first matching path from the root.
 
  
'''Parameters'''
+
===JSON Example===
  
:[[Variable Types|<- STRING]] ''ObjPath''
+
A simple example to read in an JSON formatted file and extract data from the structure.
::e.g. "rss.channel.title"
 
::''This parameter may be returned back to the caller''
 
  
 +
[[:File:JSON_Example.zip]]
  
'''Return value'''
+
==Downloadable macro reference==
  
:[[Variable Types|STRING]]
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetObjectString'''
 +
|-
 +
| colspan="2" | Sets the data string of an existing object.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Object
 +
|-
 +
| colspan="2" | Handle to the object&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Data
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>AddObject</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Adds a tag at the selected location.  
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRootHandle'''
 +
|-
 +
| colspan="2" | Allows for user to step through the objects manually using the inbuilt runtime api calls.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
Use the GetRootHandle and runtime API Tree functions .
 
  
Returns the handle of the new object.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FindObject'''
 +
|-
 +
| colspan="2" | Finds the first instance of an object. Returns the first matching path from the root. Returns 0 if the path was not found.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | ObjPath
 +
|-
 +
| colspan="2" | e.g. "rss.channel.title"&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Parameters'''
 
  
:[[Variable Types|HANDLE]] ''ParentObject''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::The Object Handle to store the new tag inside
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FindObjectString'''
 +
|-
 +
| colspan="2" | Searches for and then collects the data string from the specified path. Returns the first matching path from the root.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | ObjPath
 +
|-
 +
| colspan="2" | e.g. "rss.channel.title"&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:[[Variable Types|<- STRING]] ''Tag''
 
::Name of the object
 
::''This parameter may be returned back to the caller''
 
  
:[[Variable Types|<- STRING]] ''Data''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::data for the object (optional)
+
|-
::''This parameter may be returned back to the caller''
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AddObject'''
 +
|-
 +
| colspan="2" | Adds a tag at the selected location.  Use the GetRootHandle and runtime API Tree functions . Returns the handle of the new object.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | ParentObject
 +
|-
 +
| colspan="2" | The Object Handle to store the new tag inside&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Tag
 +
|-
 +
| colspan="2" | Name of the object&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Data
 +
|-
 +
| colspan="2" | data for the object (optional)&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
'''Return value'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FindNextObject'''
 +
|-
 +
| colspan="2" | 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.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | SubObjPath
 +
|-
 +
| colspan="2" | e.g. "item.title"&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:[[Variable Types|HANDLE]]
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ParseJSONDataString'''
 +
|-
 +
| colspan="2" | Parses JSON formatted data in a piecemeal format as and when file data is available.  Creates objects to store the contents of the JSON &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Data
 +
|-
 +
| colspan="2" | JSON Data string, can be a chunk of a file at a time&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Length
 +
|-
 +
| colspan="2" | Number of Bytes to process&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>FindNextObject</tt></u></span>===
 
Finds the next instance of an object following a GetObject* call.
 
  
Returns the first matching path from the last search.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetObjectString'''
 +
|-
 +
| colspan="2" | Collects the data string from the specified object.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Object
 +
|-
 +
| colspan="2" | Handle to the object&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
Returns 0 if the path was not found.
 
  
'''Parameters'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ClearObjects'''
 +
|-
 +
| colspan="2" | Deletes all object data ready for fresh input&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:[[Variable Types|<- STRING]] ''SubObjPath''
 
::e.g. "item.title"
 
::''This parameter may be returned back to the caller''
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetObjectTag'''
 +
|-
 +
| colspan="2" | Collects the tag string from the specified object.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Object
 +
|-
 +
| colspan="2" | Handle to the object&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Return value'''
 
  
:[[Variable Types|HANDLE]]
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''BuildXMLString'''
 +
|-
 +
| colspan="2" | Generate a XML string based on the current objects inside the component.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>ParseJSONDataString</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Parses JSON formatted data in a piecemeal format as and when file data is available.  
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DeleteObject'''
 +
|-
 +
| colspan="2" | Deletes a selected tag object.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Object
 +
|-
 +
| colspan="2" | Handle to the object&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
Creates objects to store the contents of the JSON
 
  
'''Parameters'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FindNextObjectString'''
 +
|-
 +
| colspan="2" | Searches for and then collects the data string from the specified path. Returns the first matching path from the last search&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | SubObjPath
 +
|-
 +
| colspan="2" | e.g. "item.title"&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:[[Variable Types|<- STRING]] ''Data''
 
::JSON Data string, can be a chunk of a file at a time
 
::''This parameter may be returned back to the caller''
 
  
:[[Variable Types|UINT]] ''Length''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::Number of Bytes to process
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''BuildJSONString'''
 +
|-
 +
| colspan="2" | Generate a JSON string based on the current objects inside the component.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
'''Return value'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetObjectTag'''
 +
|-
 +
| colspan="2" | Sets the tag name of an existing object.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Object
 +
|-
 +
| colspan="2" | Handle to the object&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Tag
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:''This call does not return a value''
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ParseXMLDataString'''
 +
|-
 +
| colspan="2" | Parses XML formatted data in a piecemeal format as and when file data is available.  Creates objects to store the contents of the XML.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Data
 +
|-
 +
| colspan="2" | XML Data string, can be a chunk of a file at a time&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Length
 +
|-
 +
| colspan="2" | Number of bytes to process&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>GetObjectString</tt></u></span>===
 
Collects the data string from the specified object.
 
  
'''Parameters'''
 
  
:[[Variable Types|HANDLE]] ''Object''
 
::Handle to the object
 
  
 +
==Property reference==
  
'''Return value'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
:[[Variable Types|STRING]]
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
+
|-
===<span style="font-weight: normal;"><u><tt>ClearObjects</tt></u></span>===
+
|}
Deletes all object data ready for fresh input
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetObjectTag</tt></u></span>===
 
Collects the tag string from the specified object.
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|HANDLE]] ''Object''
 
::Handle to the object
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|STRING]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>DeleteObject</tt></u></span>===
 
Deletes a selected tag object.
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|HANDLE]] ''Object''
 
::Handle to the object
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|BOOL]] : Returns true if the operation is a success, else false
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>FindNextObjectString</tt></u></span>===
 
Searches for and then collects the data string from the specified path.
 
 
 
Returns the first matching path from the last search
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|<- STRING]] ''SubObjPath''
 
::e.g. "item.title"
 
::''This parameter may be returned back to the caller''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|STRING]]
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetObjectTag</tt></u></span>===
 
Sets the tag name of an existing object.
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|HANDLE]] ''Object''
 
::Handle to the object
 
 
 
:[[Variable Types|<- STRING]] ''Tag''
 
::''This parameter may be returned back to the caller''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>ParseXMLDataString</tt></u></span>===
 
Parses XML formatted data in a piecemeal format as and when file data is available.
 
 
 
Creates objects to store the contents of the XML.
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|<- STRING]] ''Data''
 
::XML Data string, can be a chunk of a file at a time
 
::''This parameter may be returned back to the caller''
 
 
 
:[[Variable Types|UINT]] ''Length''
 
::Number of bytes to process
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
 
 
 
 
==Property reference==
 
''This component does not contain any properties''
 

Latest revision as of 17:25, 9 November 2022

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 Pack

FREE

Detailed description

No detailed description exists yet for this component

Examples

XML Example

A simple example to read in an XML formatted file and extract data from the structure.

File:XML_Example.zip


A simple example to read a HTML string into the XML parser and extract data from the within the table structure. The HTML string could be provided via a TCP client HTTP GET request.

FC6 Icon.png XML HTML Example


JSON Example

A simple example to read in an JSON formatted file and extract data from the structure.

File:JSON_Example.zip

Downloadable macro reference

Fc9-comp-macro.png SetObjectString
Sets the data string of an existing object. 
Fc9-h32-icon.png - HANDLE Object
Handle to the object 
Fc9-string-icon.png - STRING Data
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetRootHandle
Allows for user to step through the objects manually using the inbuilt runtime api calls. 
Fc9-h32-icon.png - HANDLE Return


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


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


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


Fc9-comp-macro.png 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. 
Fc9-string-icon.png - STRING SubObjPath
e.g. "item.title" 
Fc9-h32-icon.png - HANDLE Return


Fc9-comp-macro.png 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  
Fc9-string-icon.png - STRING Data
JSON Data string, can be a chunk of a file at a time 
Fc9-u16-icon.png - UINT Length
Number of Bytes to process 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetObjectString
Collects the data string from the specified object. 
Fc9-h32-icon.png - HANDLE Object
Handle to the object 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png ClearObjects
Deletes all object data ready for fresh input 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetObjectTag
Collects the tag string from the specified object. 
Fc9-h32-icon.png - HANDLE Object
Handle to the object 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png BuildXMLString
Generate a XML string based on the current objects inside the component. 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png DeleteObject
Deletes a selected tag object. 
Fc9-h32-icon.png - HANDLE Object
Handle to the object 
Fc9-bool-icon.png - BOOL Return


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


Fc9-comp-macro.png BuildJSONString
Generate a JSON string based on the current objects inside the component. 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png SetObjectTag
Sets the tag name of an existing object. 
Fc9-h32-icon.png - HANDLE Object
Handle to the object 
Fc9-string-icon.png - STRING Tag
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png 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. 
Fc9-string-icon.png - STRING Data
XML Data string, can be a chunk of a file at a time 
Fc9-u16-icon.png - UINT Length
Number of bytes to process 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties