ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / XML file functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
XMLExtractString (Function)
In french: XMLExtraitChaîne
Extracts the content of a tag found in an XML document. To perform more complex searches, use XMLDocument and XMLFind.
Example
// Load the XML code
XMLSource is string = fLoadText("example.xml")
Result1 is string
i is int = 1
 
// Extract the XML code found in the first "<operation>" tag
Result1 = XMLExtractString(XMLSource, "operation", i)
WHILE Result1 <> ""
Trace(Result1)
i = i + 1
// Extract the XML code found in the next "<operation>" tag
Result1 = XMLExtractString(XMLSource, "operation", i)
END
Syntax
<Result> = XMLExtractString(<XML code> , <Tag> [, <Subscript> [, <Search options>]])
<Result>: Character string
  • Tag content.
  • Empty string (""):
    • if the tag is not found
    • if the tag does contains no XML code.
<XML code>: Character string
XML code containing the tag.
PHP This code must be in ANSI format.
<Tag>: Character string
Name of tag whose content will be extracted.
<Subscript>: Optional integer
Index of tag (if the tag appears several times in the XML code). This parameter is set to 1 by default.
<Search options>: Optional constant
Search options for the extraction:
XMLExact
(Default value)
The tag name is case sensitive for the search.
XMLIgnoreCaseThe tag name is not case sensitive for the search.
Business / UI classification: Business Logic
Component: wd290xml.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/06/2023

Send a report | Local help