code: private boolean isXmlTextNode( Node node ) throws RepositoryException {
          // ./xmltext/xmlcharacters exception (see JSR-170 Spec 6.4.2.3)
  
          if (getPrefixedName(JcrLexicon.XMLTEXT).equals(node.getName())) {
              if (node.getNodes().getSize() == 0) {
  
                  PropertyIterator properties = node.getProperties();
                  boolean xmlCharactersFound = false;
  
                  while (properties.hasNext()) {
                      Property property = properties.nextProperty();
  
                      if (getPrefixedName(JcrLexicon.PRIMARY_TYPE).equals(property.getName())) {
                          continue;
                      }
  
                      if (getPrefixedName(JcrLexicon.XMLCHARACTERS).equals(property.getName())) {
                          xmlCharactersFound = true;
                          continue;
                      }
  
                      // If the xmltext node has any properties other than primaryType or xmlcharacters, return false;
                      return false;
                  }
  
                  return xmlCharactersFound;
              }
          }
  
          return false;
  
      }
docs: Indicates whether the current node is an XML text node as per section 6.4.2.3 of the JCR 1.0 specification. XML text nodes
  are nodes that have the name &quot;jcr:xmltext&quot; and only one property (besides the mandatory
  &quot;jcr:primaryType&quot;). The property must have a property name of &quot;jcr:xmlcharacters&quot;, a type of
  <code>String</code>, and does not have multiple values.
  <p/>
  In practice, this is handled in ModeShape by making XML text nodes have a type of &quot;dna:xmltext&quot;, which enforces
  these property characteristics.
  
  @param node the node to test
  @return whether this node is a special xml text node
  @throws RepositoryException if there is an error accessing the repository