code: protected void saveInternal(XMLStreamWriter stream) throws XMLStreamException {
          if (namespace != null) {
              stream.writeStartElement(prefix, namespace, name);
          } else {
              stream.writeStartElement(name);
          }
          for (Map.Entry<XAttributeName, String> a : attributes.entrySet()) {
              XAttributeName an = a.getKey();
              if (an.namespace != null) {
                  stream.writeAttribute(an.prefix, an.namespace, an.name, a.getValue());
              } else {
                  stream.writeAttribute(an.name, a.getValue());
              }
          }
          if (content != null) {
              stream.writeCharacters(content);
          } else {
              for (XNElement e : children) {
                  e.saveInternal(stream);
              }
          }
          
          stream.writeEndElement();
      }
docs: Store the element's content and recursively call itself for children.
  @param stream the stream output
  @throws XMLStreamException if an error occurs