PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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.
Java In the XML code, the list of attributes is sorted in alphabetical order.
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 with quotes
XML code containing the tag.
PHP This code must be in ANSI format.
<Tag>: Character string with quotes
Name of tag whose content will be extracted.
<Subscript>: Optional integer
Subscript 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: wd260xml.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment