Пример #1
0
 public void startElement(Txn transaction, ElementImpl element, NodePath path) {
   if (config != null) {
     boolean mixedContent = config.matchMixedElement(path);
     if (mixedContent || config.hasQNameIndex(element.getQName())) {
       ElementContent contentBuf =
           new ElementContent(
               element.getQName(),
               mixedContent || config.preserveMixedContent(element.getQName()));
       contentStack.push(contentBuf);
     }
   }
   super.startElement(transaction, element, path);
 }
Пример #2
0
 public void endElement(Txn transaction, ElementImpl element, NodePath path) {
   if (config != null) {
     boolean mixedContent = config.matchMixedElement(path);
     if (mixedContent || config.hasQNameIndex(element.getQName())) {
       ElementContent contentBuf = (ElementContent) contentStack.pop();
       element.getQName().setNameType(ElementValue.ELEMENT);
       engine.storeText(
           element,
           contentBuf,
           mixedContent ? NativeTextEngine.FOURTH_OPTION : NativeTextEngine.TEXT_BY_QNAME,
           null,
           mode == REMOVE_ALL_NODES);
     }
   }
   super.endElement(transaction, element, path);
 }