xml_SetAttributeValue

Assigns attributes to a specific node.

Syntax

bool xml_SetAttributeValue (StrParam)

Parameters

Three comma-separated values:
  1. The NodeID.
  2. The attribute's name.
  3. The value to be assigned to the attribute.

Smart parameters are supported.

Returns

False, if the node does not exist. Otherwise, True.

Level

All.

Details

Sets an attribute value within a specific node in the XML hierarchy.
Example

The following example assigns the current Page's Number field value to the Xpage node's Number attribute.

xml_SetAttributeValue("Xpage,Number,@P\Number")  

The following example shows how creation of an XML for invoice line items might look.

xml_NewNode("LineItem,Invoice")
xml_SetAttributeValue("LineItem,id,@ID")
xml_NewNode("ItemID,LineItem")
xml_SetNodeValue("IdemID,@F\ItemID")
xml_NewNode("ItemDesc,LineItem")
xml_SetNodeValue("ItemDesc,@F\ItemDesc")
xml_NewNode("Qty,LineItem")
xml_SetNodeValue("Qty,@F\Qty")
xml_CommitNode("LineItem")