Forms Server 8 API

Description

This method returns the local name of a given node. The local name is determined by the XML tag that represents that node. For example, examine the following XML fragment:

<page sid="PAGE1">

<global sid="global"></global>

<field sid="testField">

<value>Hello</value>

<bgcolor>120, 120, 120</bgcolor>

</field>

</page>

In this sample, the name of the page node is "page", the name of the field node is "field", the name of the value node is "value", and the name of the bgcolor node is "bgcolor".

Note that the local name does not include any namespace prefix that might exist. For example, you might have a custom option in a different namespace as shown:

<field sid="testField">

<custom:my_option>value</custom:my_option>

</field>

In this case, the local name of the custom option is returned without the prefix, resulting in "my_option".

Method

public String getLocalName( ) throws UWIException;

Parameters

There are no parameters for this method.

Returns

The name of the node or throws a generic exception (UWIException) if an error occurs.

Example

The following method takes the root node of the form and uses recursion to step through each node in the form. The method uses isXFDL and getLocalName to locate all label nodes in the XFDL namespace and changes the background color of those nodes to green.