Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 11.3   11.4   11.5   12.0   12.1   12.2   12.3   12.4   12.5   13.0    Statistic    FMM    Blog  


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


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.
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.


Returns list or error.


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.


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

Blog Entries

Created 19th September 2021, last changed 19th September 2021

XML.Import.Work - XML.List

Feedback: Report problem or ask question.

Start Chat