code: public static URIContext getInstance( boolean forXML )
      {
          URIContext uriContext = null;
  
          if ( forXML )
          {
              uriContext = new URIContext();
              uriContext.setUseAmpEntity( true );
          }
          else
          {
              uriContext = getInstance();
          }
  
          return uriContext;
      }
docs: Get a URIContext. If it's for an XML document type, the context
  will indicate that the URI should be written using the
  &quot;&amp;amp;&quot; entity, rather than the character, '&amp;'.
  If it's not for an XML doc type, then use the default context,
  but check for any overriding setting in the NetUI config.
  
  @param forXML flag indicating that the URI is for an XML doc type
  @return the URIContext