public void writeStartElement(String localName) throws XMLStreamException { namespaceContext.pushContext(); depth++; final String defaultNamespaceURI = namespaceContext.getNamespaceURI(""); if (defaultNamespaceURI == null) storeQualifiedName(T_ELEMENT_LN, null, null, localName); else storeQualifiedName(T_ELEMENT_LN, null, defaultNamespaceURI, localName); }
public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException { namespaceContext.pushContext(); depth++; storeQualifiedName(T_ELEMENT_LN, prefix, namespaceURI, localName); }
public void writeEndElement() throws XMLStreamException { namespaceContext.popContext(); storeStructure(T_END); if(--depth==0) increaseTreeCount(); }
public final boolean isWhiteSpace() { if(isCharacters() || (_eventType == CDATA)){ char [] ch = this.getTextCharacters(); int start = this.getTextStart(); int length = this.getTextLength(); for (int i = start; i < length; i++){ final char c = ch[i]; if (!(c == 0x20 || c == 0x9 || c == 0xD || c == 0xA)) return false; } return true; } return false; }
public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException { final String prefix = namespaceContext.getPrefix(namespaceURI); if (prefix == null) { // TODO throw new XMLStreamException(); } writeAttribute(prefix, namespaceURI, localName, value); }
@Override protected void processElement(String prefix, String uri, String _localName, boolean inScope) { if (_depth == 0) { _localName = localName; } super.processElement(prefix, uri, _localName, isInscope(infoset,_depth)); } };
public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException { namespaceContext.pushContext(); depth++; final String prefix = namespaceContext.getPrefix(namespaceURI); if (prefix == null) { throw new XMLStreamException(); } namespaceContext.pushContext(); storeQualifiedName(T_ELEMENT_LN, prefix, namespaceURI, localName); }
public void writeStartDocument(String encoding, String version) throws XMLStreamException { namespaceContext.resetContexts(); storeStructure(T_DOCUMENT); }
public void writeEntityRef(String str) throws XMLStreamException { storeStructure(T_UNEXPANDED_ENTITY_REFERENCE); storeContentString(str); }
protected final void storeProcessingInstruction(String target, String data) { storeStructure(T_PROCESSING_INSTRUCTION); storeStructureString(target); storeStructureString(data); }
private void storeElementAndChildren(XMLStreamReader reader) throws XMLStreamException { if (reader instanceof XMLStreamReaderEx) { storeElementAndChildrenEx((XMLStreamReaderEx)reader); } else { storeElementAndChildrenNoEx(reader); } }
public void process(XMLStreamWriter writer) throws XMLStreamException { if(_fragmentMode){ writeFragment(writer); }else{ write(writer); } }
/** * @deprecated * Use {@link #setXMLStreamBuffer(XMLStreamBuffer, boolean)} */ public void setXMLStreamBuffer(XMLStreamBuffer buffer) { setBuffer(buffer); }
public boolean hasNext() { if (requireFindNext) { findNext(); requireFindNext = false; } return (p != null); }
public boolean hasNext() { if (requireFindNext) { findNext(); requireFindNext = false; } return (namespace != null); }
public void writeProcessingInstruction(String target) throws XMLStreamException { writeProcessingInstruction(target, ""); }
/** * Read the contents of the buffer as a {@link XMLStreamReader}. * * @return * A an instance of a {@link StreamReaderBufferProcessor}. Always non-null. */ public final StreamReaderBufferProcessor readAsXMLStreamReader() throws XMLStreamException { return new StreamReaderBufferProcessor(this); }
@Override protected void processElement(String prefix, String uri, String _localName, boolean inScope) { if (_depth == 0) { _localName = localName; } super.processElement(prefix, uri, _localName, isInscope(infoset,_depth)); } };
/** * @param produceFragmentEvent * True to generate fragment SAX events without start/endDocument. * False to generate a full document SAX events. */ public void setXMLStreamBuffer(XMLStreamBuffer buffer, boolean produceFragmentEvent) { setBuffer(buffer,produceFragmentEvent); }
@Override protected void processElement(String prefix, String uri, String _localName, boolean inScope) { if (_depth == 0) { _localName = localName; } super.processElement(prefix, uri, _localName, isInscope(infoset,_depth)); } };