@Override public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException { super.startDocument(serializer, fragment,nsUriIndex2prefixIndex,nsContext); octetBufferIndex = 0; if(!fragment) { write(XML_DECL); } if(header!=null) { textBuffer.set(header); textBuffer.write(this); } }
@Override public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException { flushBuffer(); super.endDocument(fragment); }
protected void writeNsDecls(int base) throws IOException { NamespaceContextImpl.Element ns = nsContext.getCurrent(); int size = nsContext.count(); for( int i=ns.getBase(); i<size; i++ ) writeNsDecl(i); }
@Override public void endStartTag() throws SAXException { super.endStartTag(); Object op = nsContext.getCurrent().getOuterPeer(); if(op!=null) assoc.addOuter( getBuilder().getCurrentElement(), op ); Object ip = nsContext.getCurrent().getInnerPeer(); if(ip!=null) assoc.addInner( getBuilder().getCurrentElement(), ip ); } }
public void text(Pcdata value, boolean needSP) throws IOException { closeStartTag(); if(needSP) write(' '); value.writeTo(this); }
private void writeName(int prefix, String localName) throws IOException { writePrefix(prefix); textBuffer.set(localName); textBuffer.write(this); }
@Override public void beginStartTag(int prefix, String localName) throws IOException { indentStartTag(); super.beginStartTag(prefix, localName); }
@Override public void endTag(Name name) throws IOException { indentEndTag(); super.endTag(name); }
@Override public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException { write('\n'); super.endDocument(fragment); } }
public void beginStartTag(int prefix, String localName) throws IOException, XMLStreamException { next.beginStartTag(prefix, localName); this.nsUri = nsContext.getNamespaceURI(prefix); this.localName = localName; }
private void writeName(Name name) throws IOException { writePrefix(nsUriIndex2prefixIndex[name.nsUriIndex]); localNames[name.localNameIndex].write(this); }
public void startDocument(XMLSerializer serializer, boolean fragment, int[] nsUriIndex2prefixIndex, NamespaceContextImpl nsContext) throws IOException, SAXException, XMLStreamException { super.startDocument(serializer,fragment,nsUriIndex2prefixIndex, nsContext); next.startDocument(serializer, fragment, nsUriIndex2prefixIndex, nsContext); }
public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException { next.endDocument(fragment); super.endDocument(fragment); }
@Override public void beginStartTag(Name name) throws IOException { indentStartTag(); super.beginStartTag(name); }
@Override public void endTag(int prefix, String localName) throws IOException { indentEndTag(); super.endTag(prefix, localName); }