code: public String toXML(boolean bPretty) throws IllegalArgumentException {
          int indent = bPretty ? 3 : 0;
          XMLBuilder xml = new XMLBuilder(indent);
          xml.startDocument();
          toXML(xml);
          xml.endDocument();
          return xml.toString();
      }
docs: Convert the DOM tree rooted at this UNode into an XML document, optionally
  indenting each XML level to product a "pretty" structured output.
  
  @param bPretty       True to indent XML output.
  @return              XML document for the DOM tree rooted at this UNode.
  @throws IllegalArgumentException  If an XML construction error occurs.