Refine search
public void characters(XMLString text, Augmentations augs) throws XNIException { if (!fIgnoreChars) { final Element currentElement = (Element) fDOMValidatorHelper.getCurrentElement(); currentElement.appendChild(fDocument.createTextNode(text.toString())); } }
/** * Construct the XIncludeReader using the XMLInputSource and XIncludeHandler. * * @param source The XMLInputSource to use. * @param handler The XIncludeHandler to use. * @param bufferSize The size of this text reader's buffer. */ public XIncludeTextReader(XMLInputSource source, XIncludeHandler handler, int bufferSize) throws IOException { fHandler = handler; fSource = source; fTempString = new XMLString(new char[bufferSize + 1], 0, 0); }
/** * Constructs an XMLString structure preset with the specified * values. * * @param ch The character array. * @param offset The offset into the character array. * @param length The length of characters from the offset. */ public XMLString(char[] ch, int offset, int length) { setValues(ch, offset, length); } // <init>(char[],int,int)
/** * Characters. */ public void characters(XMLString text, Augmentations augs) throws XNIException { if (fInCDATASection) { Node node = fCurrentNode.getLastChild(); if (node != null && node.getNodeType() == Node.CDATA_SECTION_NODE) { CDATASection cdata = (CDATASection) node; cdata.appendData(text.toString()); } else { CDATASection cdata = fDocument.createCDATASection(text.toString()); fCurrentNode.appendChild(cdata); } } else { Node node = fCurrentNode.getLastChild(); if (node != null && node.getNodeType() == Node.TEXT_NODE) { Text textNode = (Text) node; textNode.appendData(text.toString()); } else { Text textNode = fDocument.createTextNode(text.toString()); fCurrentNode.appendChild(textNode); } } } // characters(XMLString,Augmentations)
final XMLString nondvalue, final Augmentations augs) final Element attr = this.doc.createElement(XSD_ATTRIBUTE); attr.setAttribute(NAME, aname); if (simpleType == null) simpleType = this.doc.createElement(XSD_SIMPLE_TYPE); simpleType.setAttribute(NAME, typeName); final Element restriction = this.doc.createElement(XSD_RESTRICTION); if (ENUMERATION_TYPE.equals(atype)) attr.setAttribute(ATTRIBUTE_FIXED, dvalue.toString()); fixed = true; attr.setAttribute(ATTRIBUTE_DEFAULT, dvalue.toString());
/** Comment. */ public void comment(XMLString text, Augmentations augs) throws XNIException { Comment comment = fDocument.createComment(text.toString()); fCurrentNode.appendChild(comment); } // comment(XMLString,Augmentations)
/** Processing instruction. */ public void processingInstruction(final String target, final XMLString data, final Augmentations augs) throws XNIException { final String s = data.toString(); if (XMLChar.isValidName(s)) { final ProcessingInstruction pi = fDocument.createProcessingInstruction(target, s); fCurrentNode.appendChild(pi); } } // processingInstruction(String,XMLString,Augmentations)
/** * Adds some text that need to be re-feed later. The information gets copied. */ public void add(final XMLString text, final Augmentations augs) { if (!entries.isEmpty() || text.toString().trim().length() > 0) entries.add(new Entry(text, augs)); }
if (c == quote && (fromIndex = isUnchangedByNormalization(value)) == -1) { nonNormalizedValue.setValues(value); int cquote = fEntityScanner.scanChar(); if (cquote != quote) { + fStringBuffer.toString() + "\""); value.setValues(fStringBuffer); fScanningAttribute = false; nonNormalizedValue.setValues(fStringBuffer2); reportFatalError("CloseQuoteExpected", new Object[]{eleName,atName}); return nonNormalizedValue.equals(value.ch, value.offset, value.length);
/** * Characters. */ public void characters(XMLString text, Augmentations augs) throws XNIException { if (fInCDATASection) { Node node = fCurrentNode.getLastChild(); if (node != null && node.getNodeType() == Node.CDATA_SECTION_NODE) { CDATASection cdata = (CDATASection) node; cdata.appendData(text.toString()); } else { CDATASection cdata = fDocument.createCDATASection(text.toString()); fCurrentNode.appendChild(cdata); } } else { Node node = fCurrentNode.getLastChild(); if (node != null && node.getNodeType() == Node.TEXT_NODE) { Text textNode = (Text) node; textNode.appendData(text.toString()); } else { Text textNode = fDocument.createTextNode(text.toString()); fCurrentNode.appendChild(textNode); } } } // characters(XMLString,Augmentations)
/** * Comment. */ public void comment(XMLString text, Augmentations augs) throws XNIException { Comment comment = fDocument.createComment(text.toString()); fCurrentNode.appendChild(comment); } // comment(XMLString,Augmentations)
/** Processing instruction. */ @Override public void processingInstruction(final String target, final XMLString data, final Augmentations augs) throws XNIException { final String s = data.toString(); if (XMLChar.isValidName(s)) { final ProcessingInstruction pi = fDocument.createProcessingInstruction(target, s); fCurrentNode.appendChild(pi); } }
public void characters(XMLString xmlString, Augmentations augmentations) throws XNIException { super.characters(xmlString, augmentations); buffer.append(xmlString.toString()); }
if (c == quote && (fromIndex = isUnchangedByNormalization(value)) == -1) { nonNormalizedValue.setValues(value); int cquote = fEntityScanner.scanChar(); if (cquote != quote) { + fStringBuffer.toString() + "\""); value.setValues(fStringBuffer); fScanningAttribute = false; nonNormalizedValue.setValues(fStringBuffer2); reportFatalError("CloseQuoteExpected", new Object[]{eleName,atName}); return nonNormalizedValue.equals(value.ch, value.offset, value.length);
/** Characters. */ public void characters(XMLString text, Augmentations augs) throws XNIException { if (fInCDATASection) { Node node = fCurrentNode.getLastChild(); if (node != null && node.getNodeType() == Node.CDATA_SECTION_NODE) { CDATASection cdata = (CDATASection)node; cdata.appendData(text.toString()); } else { CDATASection cdata = fDocument.createCDATASection(text.toString()); fCurrentNode.appendChild(cdata); } } else { Node node = fCurrentNode.getLastChild(); if (node != null && node.getNodeType() == Node.TEXT_NODE) { Text textNode = (Text)node; textNode.appendData(text.toString()); } else { Text textNode = fDocument.createTextNode(text.toString()); fCurrentNode.appendChild(textNode); } } } // characters(XMLString,Augmentations)
public void characters(XMLString text, Augmentations augs) throws XNIException { if (!fIgnoreChars) { append(fDocument.createTextNode(text.toString())); } }