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

From Flowcode Help
Jump to navigationJump to search
 
(2 intermediate revisions by the same user not shown)
Line 48: Line 48:
  
 
''<span style="color:red;">No additional examples</span>''
 
''<span style="color:red;">No additional examples</span>''
 +
 +
 +
 +
 +
 +
  
  
Line 55: Line 61:
 
==Macro reference==
 
==Macro reference==
  
===SetObjectString===
+
===AddObject===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| 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]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetObjectString'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AddObject'''
 
|-
 
|-
| colspan="2" | Sets the data string of an existing object.&nbsp;
+
| 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="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | Object
+
| 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" | Handle to the object&nbsp;
+
| colspan="2" | Name of the object&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Data
 
| width="90%" | Data
 
|-
 
|-
| colspan="2" | &nbsp;
+
| colspan="2" | data for the object (optional)&nbsp;
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===GetRootHandle===
+
===BuildJSONString===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| 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]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRootHandle'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''BuildJSONString'''
 
|-
 
|-
| colspan="2" | Allows for user to step through the objects manually using the inbuilt runtime api calls.&nbsp;
+
| 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-h32-icon.png]] - HANDLE
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===FindObject===
+
===BuildXMLString===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| 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]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FindObject'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''BuildXMLString'''
 
|-
 
|-
| 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;
+
| colspan="2" | Generate a XML string based on the current objects inside the component.&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===FindObjectString===
+
===ClearObjects===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| 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]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FindObjectString'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ClearObjects'''
 
|-
 
|-
| colspan="2" | Searches for and then collects the data string from the specified path. Returns the first matching path from the root.&nbsp;
+
| colspan="2" | Deletes all object data ready for fresh input&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===AddObject===
+
===DeleteObject===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| 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]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AddObject'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DeleteObject'''
 
|-
 
|-
| 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;
+
| colspan="2" | Deletes a selected tag object.&nbsp;
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | ParentObject
+
| width="90%" | Object
 
|-
 
|-
| colspan="2" | The Object Handle to store the new tag inside&nbsp;
+
| colspan="2" | Handle to the object&nbsp;
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
Line 179: Line 170:
  
  
===ParseJSONDataString===
+
===FindNextObjectString===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| 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]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ParseJSONDataString'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FindNextObjectString'''
 
|-
 
|-
| 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;
+
| 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="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Data
+
| width="90%" | SubObjPath
 
|-
 
|-
| colspan="2" | JSON Data string, can be a chunk of a file at a time&nbsp;
+
| colspan="2" | e.g. "item.title"&nbsp;
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===GetObjectString===
+
===FindObject===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| 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]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetObjectString'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FindObject'''
 
|-
 
|-
| colspan="2" | Collects the data string from the specified object.&nbsp;
+
| 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-h32-icon.png]] - HANDLE
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Object
+
| width="90%" | ObjPath
 
|-
 
|-
| colspan="2" | Handle to the object&nbsp;
+
| 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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===ClearObjects===
+
===FindObjectString===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| 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]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ClearObjects'''
+
| 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;
 +
|-
 
|-
 
|-
| colspan="2" | Deletes all object data ready for fresh input&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-void-icon.png]] - VOID
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===GetObjectTag===
+
===GetObjectString===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| 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]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetObjectTag'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetObjectString'''
 
|-
 
|-
| colspan="2" | Collects the tag string from the specified object.&nbsp;
+
| colspan="2" | Collects the data string from the specified object.&nbsp;
 
|-
 
|-
 
|-
 
|-
Line 255: Line 246:
  
  
===BuildXMLString===
+
===GetObjectTag===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| 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]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''BuildXMLString'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetObjectTag'''
 +
|-
 +
| colspan="2" | Collects the tag string from the specified object.&nbsp;
 +
|-
 
|-
 
|-
| colspan="2" | Generate a XML string based on the current objects inside the component.&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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
Line 269: Line 265:
  
  
===DeleteObject===
+
===GetRootHandle===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| 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]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DeleteObject'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRootHandle'''
 
|-
 
|-
| colspan="2" | Deletes a selected tag object.&nbsp;
+
| colspan="2" | Allows for user to step through the objects manually using the inbuilt runtime api calls.&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===FindNextObjectString===
+
===ParseJSONDataString===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| 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]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''FindNextObjectString'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ParseJSONDataString'''
 
|-
 
|-
| colspan="2" | Searches for and then collects the data string from the specified path. Returns the first matching path from the last search&nbsp;
+
| 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="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | SubObjPath
+
| 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" | e.g. "item.title"&nbsp;
+
| colspan="2" | Number of Bytes to process&nbsp;
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===BuildJSONString===
+
===ParseXMLDataString===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| 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]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''BuildJSONString'''
+
| 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;
 
|-
 
|-
| colspan="2" | Generate a JSON string based on the current objects inside the component.&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-string-icon.png]] - STRING
+
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
  
  
===SetObjectTag===
+
===SetObjectString===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| 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]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetObjectTag'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetObjectString'''
 
|-
 
|-
| colspan="2" | Sets the tag name of an existing object.&nbsp;
+
| colspan="2" | Sets the data string of an existing object.&nbsp;
 
|-
 
|-
 
|-
 
|-
Line 336: Line 342:
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Tag
+
| width="90%" | Data
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
Line 345: Line 351:
  
  
===ParseXMLDataString===
+
===SetObjectTag===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
 
| 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]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ParseXMLDataString'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetObjectTag'''
 
|-
 
|-
| 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;
+
| colspan="2" | Sets the tag name of an existing object.&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | Data
+
| width="90%" | Object
 
|-
 
|-
| colspan="2" | XML Data string, can be a chunk of a file at a time&nbsp;
+
| colspan="2" | Handle to the object&nbsp;
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Length
+
| width="90%" | Tag
 
|-
 
|-
| colspan="2" | Number of bytes to process&nbsp;
+
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
 
 
  
  

Latest revision as of 13:13, 7 February 2023

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

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


BuildJSONString

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


BuildXMLString

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


ClearObjects

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


DeleteObject

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


FindNextObject

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


FindNextObjectString

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


FindObject

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


FindObjectString

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


GetObjectString

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


GetObjectTag

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


GetRootHandle

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


ParseJSONDataString

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


ParseXMLDataString

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


SetObjectString

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


SetObjectTag

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


Property reference

Fc9-prop-icon.png Properties