public void leafElement( Name tagName, String data, String fieldName ) throws SAXException, IOException, XMLStreamException { if(seenRoot) { textHasAlreadyPrinted = false; nse = nse.push(); out.beginStartTag(tagName); out.endStartTag(); if(data != null) try { out.text(data,false); } catch (IllegalArgumentException e) { throw new IllegalArgumentException(Messages.ILLEGAL_CONTENT.format(fieldName, e.getMessage())); } out.endTag(tagName); nse = nse.pop(); } else { // root element has additional processing like xsi:schemaLocation, // so we need to go the slow way startElement(tagName,null); endNamespaceDecls(null); endAttributes(); try { out.text(data, false); } catch (IllegalArgumentException e) { throw new IllegalArgumentException(Messages.ILLEGAL_CONTENT.format(fieldName, e.getMessage())); } endElement(); } }
public void leafElement( Name tagName, String data, String fieldName ) throws SAXException, IOException, XMLStreamException { if(seenRoot) { textHasAlreadyPrinted = false; nse = nse.push(); out.beginStartTag(tagName); out.endStartTag(); if(data != null) try { out.text(data,false); } catch (IllegalArgumentException e) { throw new IllegalArgumentException(Messages.ILLEGAL_CONTENT.format(fieldName, e.getMessage())); } out.endTag(tagName); nse = nse.pop(); } else { // root element has additional processing like xsi:schemaLocation, // so we need to go the slow way startElement(tagName,null); endNamespaceDecls(null); endAttributes(); try { out.text(data, false); } catch (IllegalArgumentException e) { throw new IllegalArgumentException(Messages.ILLEGAL_CONTENT.format(fieldName, e.getMessage())); } endElement(); } }
public void leafElement( Name tagName, String data, String fieldName ) throws SAXException, IOException, XMLStreamException { if(seenRoot) { textHasAlreadyPrinted = false; nse = nse.push(); out.beginStartTag(tagName); out.endStartTag(); if(data != null) try { out.text(data,false); } catch (IllegalArgumentException e) { throw new IllegalArgumentException(Messages.ILLEGAL_CONTENT.format(fieldName, e.getMessage())); } out.endTag(tagName); nse = nse.pop(); } else { // root element has additional processing like xsi:schemaLocation, // so we need to go the slow way startElement(tagName,null); endNamespaceDecls(null); endAttributes(); try { out.text(data, false); } catch (IllegalArgumentException e) { throw new IllegalArgumentException(Messages.ILLEGAL_CONTENT.format(fieldName, e.getMessage())); } endElement(); } }
private void startElement() { nse = nse.push();
private void startElement() { nse = nse.push();
public void leafElement( Name tagName, String data, String fieldName ) throws SAXException, IOException, XMLStreamException { if(seenRoot) { textHasAlreadyPrinted = false; nse = nse.push(); out.beginStartTag(tagName); out.endStartTag(); if(data != null) try { out.text(data,false); } catch (IllegalArgumentException e) { throw new IllegalArgumentException(Messages.ILLEGAL_CONTENT.format(fieldName, e.getMessage())); } out.endTag(tagName); nse = nse.pop(); } else { // root element has additional processing like xsi:schemaLocation, // so we need to go the slow way startElement(tagName,null); endNamespaceDecls(null); endAttributes(); try { out.text(data, false); } catch (IllegalArgumentException e) { throw new IllegalArgumentException(Messages.ILLEGAL_CONTENT.format(fieldName, e.getMessage())); } endElement(); } }
public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException { if(value instanceof Base64Data && !serializer.getInlineBinaryFlag()) { Base64Data b64d = (Base64Data) value; String cid; if(b64d.hasData()) cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.get(),0,b64d.getDataLen(),b64d.getMimeType(),nsUri,localName); else cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.getDataHandler(),nsUri,localName); if(cid!=null) { nsContext.getCurrent().push(); int prefix = nsContext.declareNsUri(WellKnownNamespace.XOP,"xop",false); beginStartTag(prefix,"Include"); attribute(-1,"href",cid); endStartTag(); endTag(prefix,"Include"); nsContext.getCurrent().pop(); return; } } next.text(value, needsSeparatingWhitespace); } }
public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException { if(value instanceof Base64Data && !serializer.getInlineBinaryFlag()) { Base64Data b64d = (Base64Data) value; String cid; if(b64d.hasData()) cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.get(),0,b64d.getDataLen(),b64d.getMimeType(),nsUri,localName); else cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.getDataHandler(),nsUri,localName); if(cid!=null) { nsContext.getCurrent().push(); int prefix = nsContext.declareNsUri(WellKnownNamespace.XOP,"xop",false); beginStartTag(prefix,"Include"); attribute(-1,"href",cid); endStartTag(); endTag(prefix,"Include"); nsContext.getCurrent().pop(); return; } } next.text(value, needsSeparatingWhitespace); } }
public void leafElement( Name tagName, Pcdata data, String fieldName ) throws SAXException, IOException, XMLStreamException { if(seenRoot) { textHasAlreadyPrinted = false; nse = nse.push(); out.beginStartTag(tagName); out.endStartTag(); if(data != null) out.text(data,false); out.endTag(tagName); nse = nse.pop(); } else { // root element has additional processing like xsi:schemaLocation, // so we need to go the slow way startElement(tagName,null); endNamespaceDecls(null); endAttributes(); out.text(data,false); endElement(); } }
public void leafElement( Name tagName, Pcdata data, String fieldName ) throws SAXException, IOException, XMLStreamException { if(seenRoot) { textHasAlreadyPrinted = false; nse = nse.push(); out.beginStartTag(tagName); out.endStartTag(); if(data != null) out.text(data,false); out.endTag(tagName); nse = nse.pop(); } else { // root element has additional processing like xsi:schemaLocation, // so we need to go the slow way startElement(tagName,null); endNamespaceDecls(null); endAttributes(); out.text(data,false); endElement(); } }
private void startElement() { nse = nse.push();
public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException { if(value instanceof Base64Data && !serializer.getInlineBinaryFlag()) { Base64Data b64d = (Base64Data) value; String cid; if(b64d.hasData()) cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.get(),0,b64d.getDataLen(),b64d.getMimeType(),nsUri,localName); else cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.getDataHandler(),nsUri,localName); if(cid!=null) { nsContext.getCurrent().push(); int prefix = nsContext.declareNsUri(WellKnownNamespace.XOP,"xop",false); beginStartTag(prefix,"Include"); attribute(-1,"href",cid); endStartTag(); endTag(prefix,"Include"); nsContext.getCurrent().pop(); return; } } next.text(value, needsSeparatingWhitespace); } }
public void leafElement( Name tagName, Pcdata data, String fieldName ) throws SAXException, IOException, XMLStreamException { if(seenRoot) { textHasAlreadyPrinted = false; nse = nse.push(); out.beginStartTag(tagName); out.endStartTag(); if(data != null) out.text(data,false); out.endTag(tagName); nse = nse.pop(); } else { // root element has additional processing like xsi:schemaLocation, // so we need to go the slow way startElement(tagName,null); endNamespaceDecls(null); endAttributes(); out.text(data,false); endElement(); } }
private void startElement() { nse = nse.push();
public void text( Pcdata value, boolean needsSeparatingWhitespace ) throws IOException, SAXException, XMLStreamException { if(value instanceof Base64Data && !serializer.getInlineBinaryFlag()) { Base64Data b64d = (Base64Data) value; String cid; if(b64d.hasData()) cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.get(),0,b64d.getDataLen(),b64d.getMimeType(),nsUri,localName); else cid = serializer.attachmentMarshaller.addMtomAttachment( b64d.getDataHandler(),nsUri,localName); if(cid!=null) { nsContext.getCurrent().push(); int prefix = nsContext.declareNsUri(WellKnownNamespace.XOP,"xop",false); beginStartTag(prefix,"Include"); attribute(-1,"href",cid); endStartTag(); endTag(prefix,"Include"); nsContext.getCurrent().pop(); return; } } next.text(value, needsSeparatingWhitespace); } }
public void leafElement( Name tagName, Pcdata data, String fieldName ) throws SAXException, IOException, XMLStreamException { if(seenRoot) { textHasAlreadyPrinted = false; nse = nse.push(); out.beginStartTag(tagName); out.endStartTag(); if(data != null) out.text(data,false); out.endTag(tagName); nse = nse.pop(); } else { // root element has additional processing like xsi:schemaLocation, // so we need to go the slow way startElement(tagName,null); endNamespaceDecls(null); endAttributes(); out.text(data,false); endElement(); } }