lux.xml
Class SaxonDocBuilder
java.lang.Object
lux.xml.SaxonDocBuilder
- All Implemented Interfaces:
- StAXHandler
- Direct Known Subclasses:
- OffsetDocBuilder, XmlHighlighter
public class SaxonDocBuilder
- extends Object
- implements StAXHandler
|
Field Summary |
protected net.sf.saxon.s9api.BuildingStreamWriterImpl |
writer
|
|
Constructor Summary |
SaxonDocBuilder(net.sf.saxon.s9api.Processor processor)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
writer
protected net.sf.saxon.s9api.BuildingStreamWriterImpl writer
SaxonDocBuilder
public SaxonDocBuilder(net.sf.saxon.s9api.Processor processor)
- Parameters:
processor - the Saxon processor
- Throws:
LuxException - if there is an error creating an XMLStreamWriter
getDocument
public net.sf.saxon.s9api.XdmNode getDocument()
throws net.sf.saxon.s9api.SaxonApiException
- Throws:
net.sf.saxon.s9api.SaxonApiException
handleEvent
public void handleEvent(XMLStreamReader reader,
int eventType)
throws XMLStreamException
- Description copied from interface:
StAXHandler
- This method receives StAX events. It should never call XMLStreamReader.next()
since if it does, its caller will miss the event.
- Specified by:
handleEvent in interface StAXHandler
- Parameters:
reader - the reader from which events are being readeventType - the XML stream event type
- Throws:
XMLStreamException
reset
public void reset()
- Description copied from interface:
StAXHandler
- reinitialize any internal state and prepare the handler for re-use
- Specified by:
reset in interface StAXHandler
getOffsets
public Offsets getOffsets()
- Returns:
- the offsets accumulated for the parsed document. This class always returns null; to receive
offsets, use
OffsetDocBuilder.
Copyright © 2013. All Rights Reserved.