| java.lang.Object org.apache.cxf.staxutils.StaxUtils
StaxUtils | final public class StaxUtils (Code) | | |
Method Summary | |
public static void | copy(Document doc, XMLStreamWriter writer) | public static void | copy(Element node, XMLStreamWriter writer) | public static void | copy(XMLStreamReader reader, XMLStreamWriter writer) Copies the reader to the writer. | public static XMLStreamReader | createFilteredReader(XMLStreamReader reader, StreamFilter filter) | public static XMLStreamReader | createXMLStreamReader(InputStream in, String encoding) | public static XMLStreamReader | createXMLStreamReader(InputStream in) | public static XMLStreamReader | createXMLStreamReader(Element el) | public static XMLStreamReader | createXMLStreamReader(Document doc) | public static XMLStreamReader | createXMLStreamReader(Source source) | public static XMLStreamReader | createXMLStreamReader(Reader reader) | public static XMLStreamWriter | createXMLStreamWriter(Writer out) | public static XMLStreamWriter | createXMLStreamWriter(OutputStream out) | public static XMLStreamWriter | createXMLStreamWriter(OutputStream out, String encoding) | public static XMLStreamWriter | createXMLStreamWriter(Result r) | public static String | getUniquePrefix(XMLStreamWriter writer, String namespaceURI, boolean declare) Create a unique namespace uri/prefix combination.
Parameters: nsUri - The namespace with the specified URI. | public static String | getUniquePrefix(XMLStreamWriter writer) | public static XMLInputFactory | getXMLInputFactory() | public static XMLInputFactory | getXMLInputFactory(boolean nsAware) | public static XMLOutputFactory | getXMLOutputFactory() | public static void | nextEvent(XMLStreamReader dr) | public static void | printXmlFragment(XMLStreamReader reader) | public static Document | read(XMLStreamReader reader) | public static Document | read(DocumentBuilder builder, XMLStreamReader reader, boolean repairing) | public static void | readDocElements(Node parent, XMLStreamReader reader, boolean repairing) | public static QName | readQName(XMLStreamReader reader) Reads a QName from the element text. | public static boolean | skipToStartOfElement(XMLStreamReader in) Returns true if currently at the start of an element, otherwise move
forwards to the next element start and return true, otherwise false is
returned if the end of the stream is reached. | public static boolean | skipToStartOfElement(DepthXMLStreamReader in) | public static boolean | toNextElement(DepthXMLStreamReader dr) | public static boolean | toNextTag(DepthXMLStreamReader reader, QName endTag) | public static boolean | toNextText(DepthXMLStreamReader reader) | public static void | writeDocument(Document d, XMLStreamWriter writer, boolean repairing) | public static void | writeDocument(Document d, XMLStreamWriter writer, boolean writeProlog, boolean repairing) | public static void | writeElement(Element e, XMLStreamWriter writer, boolean repairing) Writes an Element to an XMLStreamWriter. | public static void | writeElement(Element e, XMLStreamWriter writer, boolean repairing, boolean endElement) Writes an Element to an XMLStreamWriter. | public static void | writeNode(Node n, XMLStreamWriter writer, boolean repairing) | public static void | writeStartElement(XMLStreamWriter writer, String prefix, String name, String namespace) |
copy | public static void copy(XMLStreamReader reader, XMLStreamWriter writer) throws XMLStreamException(Code) | | Copies the reader to the writer. The start and end document methods must
be handled on the writer manually. TODO: if the namespace on the reader
has been declared previously to where we are in the stream, this probably
won't work.
Parameters: reader - Parameters: writer - throws: XMLStreamException - |
skipToStartOfElement | public static boolean skipToStartOfElement(XMLStreamReader in) throws XMLStreamException(Code) | | Returns true if currently at the start of an element, otherwise move
forwards to the next element start and return true, otherwise false is
returned if the end of the stream is reached.
|
writeElement | public static void writeElement(Element e, XMLStreamWriter writer, boolean repairing) throws XMLStreamException(Code) | | Writes an Element to an XMLStreamWriter. The writer must already have
started the doucment (via writeStartDocument()). Also, this probably
won't work with just a fragment of a document. The Element should be the
root element of the document.
Parameters: e - Parameters: writer - throws: XMLStreamException - |
writeElement | public static void writeElement(Element e, XMLStreamWriter writer, boolean repairing, boolean endElement) throws XMLStreamException(Code) | | Writes an Element to an XMLStreamWriter. The writer must already have
started the document (via writeStartDocument()). Also, this probably
won't work with just a fragment of a document. The Element should be the
root element of the document.
Parameters: e - Parameters: writer - Parameters: endElement - true iff the element should be ended throws: XMLStreamException - |
|
|