xtagvalue(
TEXT
,
TAGNAME
)
The xtagvalue( function extracts the text from the first matching HTML or XML tag.
Parameters
This function has two parameters:
text – the text containing tags
tagname – name of the tag value
Description
This function extracts the text from the first matching HTML or XML tag.
xtagvalue("<red>34</red><blue>60</blue><green>10</green>","red") ☞ 34
xtagvalue("<red>34</red><blue>60</blue><green>10</green>","green") ☞ 10
xtagvalue("<red>34</red><blue>60</blue><green>10</green>","blue") ☞ 60
Note: This function is equivalent to:
tagdata(xtext,"<"+tagname+">","</"+tagname+">",1)
See Also
- gettaglocation -- locates the first matching tag within some text.
- gettaglocations -- locates all matching tags within some text.
- settagdata -- changes the contents of a tag.
- setxtagvalue -- changes the contents of a tag.
- tagarray( -- builds an array (see Text Arrays) containing the body of all the specified tags (usually HTML tags) in the text.
- tagcount( -- counts the number of times a specified tag (usually an HTML tag) appears in the text. See Tag Parsing for more information on HTML tags.
- tagdata( -- extracts the body of the specified tag (usually an HTML tag) in the text. See Tag Parsing for more information on HTML tags.
- tagend( -- returns the ending position of the specified tag (usually an HTML tag) in the text.
- tagnumber( -- checks to see if a specified position is inside of a tag (usually an HTML tag).
- tagparameter( -- extracts the value of a tag parameter embedded in some text, where the tag parameter takes the form *name=value*.
- tagstart( -- returns the starting position of the specified tag (usually an HTML tag) in the text.
- tagstrip( -- removes tags (usually HTML tags) from within a piece of text.
- xtag( -- generates an HTML/XML tag.
History
10.0 | No Change | Carried over from Panorama 6.0. |