getNodeValue method: Utility class
Syntax
getNodeValue(String, Tag)
Description
Use this method to extract the value from the first element enclosed by the given tag in the source string.
Parameters
| Parameter | Description |
|---|---|
|
String |
Specifies the string to check. |
|
Tag |
Specifies the tag to search for as a string. |
Returns
A string containing the value from the first element enclosed by the specified tag.
Example
import PTFP_FEED:UTILITY:Utility;
Local PTFP_FEED:UTILITY:Utility &utility = create PTFP_FEED:UTILITY:Utility();
&str = "<div><p>value1</p><p>value2</p></div>";
&str1 = &utility.getNodeValue(&str, "p");
/* &str1="value1" */