Community articlegetLiteralEx method
Added by IBM contributorIBM on July 26, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars


This method retrieves the literal of a node. The literal is returned in the specified character set.
Note: It is not necessary to call this method when you are using XForms. Use the extractXFormsInstance method instead.


   public String getLiteralEx(
      String theCharSet
   ) throws UWIException;


Table 1. Method parameters
theCharSetStringThe character set you want to use to view the literal string. Use null for ANSI/Unicode.


A string containing the literal of the node or throws a generic exception (UWIException) if an error occurs. If the literal is empty or does not exist, the method returns null.


The following example uses dereferenceEx to locate a specific node. getLiteralEx is then used to get the literal value for that node.
   private static void getGender( ) throws UWIException
   FormNodeP tempNode;   
   String temp;
      if ((tempNode = theForm.dereferenceEx(null, "PAGE1.MALERADIO.value", 
         0, FormNodeP.UFL_OPTION_REFERENCE | FormNodeP.UFL_SEARCH, null)) == 
         throw new UWIException("Could not locate MALERADIO value node.");
      temp = tempNode.getLiteralEx(null);
      /* additional code removed */

Parent topic:
FormNodeP class