List of utility methods to do XMLStreamReader
void | skipNewLines(XMLStreamReader xmlStreamReader) Skip new lines after the end elements. if (xmlStreamReader.isCharacters()) { while (xmlStreamReader.isCharacters() && xmlStreamReader.hasNext()) xmlStreamReader.next(); |
String | toReadableEvent(XMLStreamReader r) Utility method that converts the current event on the XML stream to something human-readable for debug purposes. int t = r.getEventType(); if (t == 1) return "<" + r.getLocalName() + ">"; if (t == 2) return "</" + r.getLocalName() + ">"; if (t == 3) return "PROCESSING_INSTRUCTION"; if (t == 4) ... |
void | write(XMLStreamReader xmlr, XMLStreamWriter writer) Borrowed from org.apache.xml.security.test.stax.utils.XmlReaderToWriter switch (xmlr.getEventType()) { case XMLEvent.START_ELEMENT: final String localName = xmlr.getLocalName(); final String namespaceURI = xmlr.getNamespaceURI(); if (namespaceURI != null && namespaceURI.length() > 0) { final String prefix = xmlr.getPrefix(); if (prefix != null) { writer.writeStartElement(prefix, localName, namespaceURI); ... |
void | writeCharacters(XMLStreamReader reader, XMLStreamWriter writer) write Characters writer.writeCharacters(reader.getText()); |