Bookshelf Home | Contents | Index | Search | PDF |
Business Processes and Rules: Siebel eBusiness Application Integration Volume IV > Data Mapping Using Scripts > XML Property Set Functions >
XML Element Accessors
These functions provide access to elements represented by property sets. Table 46 presents the parameter for this function.
XPSGetTagName()
Retrieves the tag name of an XML element.
Syntax
XPSGetTagName (xmlPropSet)
Table 46. Parameter for XPSGetTagName() Method Parameter Description xmlPropSet The output property set.Returns
String. If xmlPropSet is null, XPSGetTagName returns
null
.XPSSetTagName()
This function sets the tag name of an XML element. Table 47 presents the parameters for this function.
Syntax
XPSSetTagName (xmlPropSet, tagName)
Table 47. Parameters for XPSSetTagName() Method Parameter Description xmlPropSet The property set. tagName The name you want to supply as the current element name in the XML document.Returns
String
XPSGetTextValue()
This function returns the text value of an XML element as a string. Table 48 presents the parameters for this function.
Syntax
XPSGetTextValue (xmlPropSet [, defaultIfNull [, defaultIfEmpty]])
Returns
String or
null
Usage
If xmlPropSet is null then null is returned. You can use the optional defaultIfNull and defaultIfEmpty arguments to override null and empty string ("") return values. An element's text value is the text between an XML element's start and end tags, excluding child elements.
XPSSetTextValue()
This function sets the text value of an XML element. Table 49 presents the parameters for this function.
Syntax
XPSSetTextValue (xmlPropSet, text)
Table 49. Parameters for XPSSetTextValue() Method Parameter Description xmlPropSet The property set. text A string you want inserted between start and end tags of an XML element.Returns
Not applicable
Usage
The text argument should be a string. An element's text value is the text between the element's start and end tags, excluding child elements.
XPSGetAttribute()
This function retrieves an element's attribute of the given name and returns it as a string. Table 50 presents the parameters for this function.
Syntax
XPSGetAttribute (xmlPropSet, name [, defaultIfNull [, defaultIfEmpty]])
Returns
String
Usage
A null value is returned if xmlPropSet is null or the element does not have the named attribute. The optional defaultIfNull and defaultIfEmpty arguments can be used to override null and empty string ("") return values.
XPSSetAttribute()
This function sets an element attribute value. Table 51 presents the parameters for this function.
Syntax
XPSSetAttribute (xmlPropSet, name, value)
Table 51. Parameters for XPSSetAttribute() Method Parameter Description xmlPropSet The output property set. name Attribute name. value String value you want to supply as the attribute value.Returns
String
Usage
No action is taken if any of the arguments are null.
XPSGetChildCount()
This function returns the number of children of an element. Table 52 presents the parameter for this function.
Syntax
XPSGetChildCount(xmlPropSet)
Table 52. Parameter for XPSGetChildCount() Method Parameter Description xmlPropSet The property set.Returns
Number
Usage
All children of an element are also elements.
XPSGetChild()
This function returns the nth child element as specified by the index. Table 53 presents the parameters for this function.
Syntax
XPSGetChild(xmlPropSet, index)
Table 53. Parameters for XPSGetChild() Method Parameter Description xmlPropSet The property set. index Number, starting at zero, of child elements of another element in an XML document.Returns
Property set
Usage
Child elements are specified using a zero-based index. A value of
null
is returned if the index is invalid.XPSFindChild()
This function returns the first child element with the tagName. Table 54 presents the parameters for this function.
Syntax
XPSFindChild (xmlPropSet, tagName)
Table 54. Parameters for XPSFindChild() Method Parameter Description xmlPropSet The property set. tagName An XML element tag that signifies the first child element of another XML element.Returns
Property set.
Usage
A value of
null
is returned if there is no child with the specified tag name.XPSAddChild()
This function creates a new child element with the tagName and appends it to the list of xmlPropSet's children. Table 55 presents the parameters for this function.
Syntax
XPSAddChild (xmlPropSet, tagName [, textValue])
Returns
Property set
Bookshelf Home | Contents | Index | Search | PDF |
Business Processes and Rules: Siebel eBusiness Application Integration Volume IV Published: 18 April 2003 |