/** * INTERNAL: */ public void endDocument() { outputStreamWrite(cr); }
/** * INTERNAL: */ public void element(XPathFragment frag) { isLastEventText = false; if (isStartElementOpen) { outputStreamWrite(CLOSE_ELEMENT); isStartElementOpen = false; } outputStreamWrite(cr); outputStreamWriteTab(); super.element(frag); }
/** * INTERNAL: */ public void endDocument() { outputStreamWrite(cr); }
/** * INTERNAL: */ public void element(XPathFragment frag) { isLastEventText = false; if (isStartElementOpen) { outputStreamWrite(CLOSE_ELEMENT); isStartElementOpen = false; } outputStreamWrite(cr); outputStreamWriteTab(); super.element(frag); }
public void comment(char[] ch, int start, int length) throws SAXException { if (isStartElementOpen) { outputStreamWrite(CLOSE_ELEMENT); outputStreamWrite(cr); isStartElementOpen = false; } writeComment(ch, start, length); complexType = false; } }
/** * INTERNAL: */ public void endElement(XPathFragment xPathFragment, NamespaceResolver namespaceResolver) { isLastEventText = false; numberOfTabs--; if (isStartElementOpen) { outputStreamWrite((byte) '/'); outputStreamWrite((byte) '>'); isStartElementOpen = false; return; } if (complexType) { outputStreamWrite(cr); outputStreamWriteTab(); } else { complexType = true; } super.endElement(xPathFragment, namespaceResolver); }
public void comment(char[] ch, int start, int length) throws SAXException { if (isStartElementOpen) { outputStreamWrite(CLOSE_ELEMENT); outputStreamWrite(cr); isStartElementOpen = false; } writeComment(ch, start, length); complexType = false; } }
/** * INTERNAL: */ public void endElement(XPathFragment xPathFragment, NamespaceResolver namespaceResolver) { isLastEventText = false; numberOfTabs--; if (isStartElementOpen) { outputStreamWrite((byte) '/'); outputStreamWrite((byte) '>'); isStartElementOpen = false; return; } if (complexType) { outputStreamWrite(cr); outputStreamWriteTab(); } else { complexType = true; } super.endElement(xPathFragment, namespaceResolver); }
public void endElement(String namespaceURI, String localName, String qName) throws SAXException { isLastEventText = false; numberOfTabs--; if (isStartElementOpen) { outputStreamWrite((byte) '/'); outputStreamWrite((byte) '>'); isStartElementOpen = false; complexType = true; return; } if (complexType) { outputStreamWrite(cr); outputStreamWriteTab(); } else { complexType = true; } super.endElement(namespaceURI, localName, qName); }
public void endElement(String namespaceURI, String localName, String qName) throws SAXException { isLastEventText = false; numberOfTabs--; if (isStartElementOpen) { outputStreamWrite((byte) '/'); outputStreamWrite((byte) '>'); isStartElementOpen = false; complexType = true; return; } if (complexType) { outputStreamWrite(cr); outputStreamWriteTab(); } else { complexType = true; } super.endElement(namespaceURI, localName, qName); }
/** * INTERNAL */ public void writeHeader() { outputStreamWrite(getMarshaller().getXmlHeader().getBytes()); outputStreamWrite(cr); }
/** * INTERNAL */ public void writeHeader() { outputStreamWrite(getMarshaller().getXmlHeader().getBytes()); outputStreamWrite(cr); }
/** * INTERNAL: */ public void startDocument(String encoding, String version) { super.startDocument(encoding, version); outputStreamWrite(cr); }
private void outputStreamWriteTab() { for (int x = 0; x < numberOfTabs; x++) { outputStreamWrite(tab()); } }
/** * INTERNAL: */ public void startDocument(String encoding, String version) { super.startDocument(encoding, version); outputStreamWrite(cr); }
/** * INTERNAL: */ public void cdata(String value) { //Format the CDATA on it's own line if(isStartElementOpen) { outputStreamWrite(CLOSE_ELEMENT); isStartElementOpen = false; } super.cdata(value); complexType=false; }
/** * INTERNAL: */ public void cdata(String value) { //Format the CDATA on it's own line if(isStartElementOpen) { outputStreamWrite(CLOSE_ELEMENT); isStartElementOpen = false; } super.cdata(value); complexType=false; }
private void outputStreamWriteTab() { for (int x = 0; x < numberOfTabs; x++) { outputStreamWrite(tab()); } }
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { try { if (isStartElementOpen) { outputStreamWrite(CLOSE_ELEMENT); } if (!isLastEventText) { outputStreamWrite(cr); outputStreamWriteTab(); } outputStreamWrite(OPEN_START_ELEMENT); outputStreamWrite(qName.getBytes(Constants.DEFAULT_XML_ENCODING)); numberOfTabs++; isStartElementOpen = true; isLastEventText = false; // Handle attributes handleAttributes(atts); // Handle prefix mappings writePrefixMappings(); } catch (UnsupportedEncodingException e) { throw XMLMarshalException.marshalException(e); } }
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { try { if (isStartElementOpen) { outputStreamWrite(CLOSE_ELEMENT); } if (!isLastEventText) { outputStreamWrite(cr); outputStreamWriteTab(); } outputStreamWrite(OPEN_START_ELEMENT); outputStreamWrite(qName.getBytes(Constants.DEFAULT_XML_ENCODING)); numberOfTabs++; isStartElementOpen = true; isLastEventText = false; // Handle attributes handleAttributes(atts); // Handle prefix mappings writePrefixMappings(); } catch (UnsupportedEncodingException e) { throw XMLMarshalException.marshalException(e); } }