Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
XML.ItemRefs
Queries entries from XML nodes.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
XML | 11.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "XML.ItemRefs"; XML; Flags ) More
Parameters
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>" |
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 8 to remove namespaces. |
0 |
Result
Returns list or error.
Description
Queries entries from XML nodes.Returns list of reference numbers for XML objects.
Processing large XML gets faster if you first split the top level items into individual items and then process each on your own.
Later pass list to XML.Release to release them all.
See JSON.GetArrayItems for JSON.
Examples
Try it:
# New Script in file Extract Text
Set Variable [ $xml ; Value: "<people><person><firstname>Peter</firstname></person><person><firstname>Michael</firstname></person></people>" ]
# split it
Set Variable [ $list ; Value: MBS( "XML.ItemRefs"; $xml; 0 ) ]
# now take items from the list and show
Set Variable [ $xml1 ; Value: GetValue($list; 1) ]
Show Custom Dialog [ "xml1" ; MBS("XML.Format"; $xml1) ]
Set Variable [ $xml2 ; Value: GetValue($list; 2) ]
Show Custom Dialog [ "xml2" ; MBS("XML.Format"; $xml2) ]
# free memory
Set Variable [ $r ; Value: MBS( "XML.Release"; $list ) ]
See also
Release notes
- Version 11.5
- Added XML.ItemRefs function.
Blog Entries
- New in version 11.5 of MBS FileMaker Plugin
- Neues MBS FileMaker Plugin 11.5 - Über 6600 Funktionen in einem Plugin
- MBS FileMaker Plugin 11.5
- MBS FileMaker Plugin, version 11.5pr1
This function checks for a license.
Created 19th September 2021, last changed 19th September 2021