public class PTreeReader
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PTreeReader.PTreeException |
Constructor and Description |
---|
PTreeReader() |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Command line interface to read a PTree document and convert it to lexical XML
|
TreeInfo |
readTree(java.io.DataInputStream in,
java.lang.String systemId,
Configuration config)
Read an input stream containing an XML document in PTree format, returning an in-memory
representation of the document
|
void |
readTree(java.io.DataInputStream in,
java.lang.String systemId,
Configuration config,
Receiver out)
Read an input stream containing an XML document in PTree format, passing the events
associated with the document to a Saxon Receiver
|
public TreeInfo readTree(java.io.DataInputStream in, java.lang.String systemId, Configuration config) throws java.io.IOException, XPathException
in
- the input stream holding the PTree document. The method will consume the stream;
the caller is responsible for closing the stream after use.systemId
- the base URI to be used for the document associated with this input streamconfig
- the Saxon Configurationjava.io.IOException
- if an error occurs reading the input streamXPathException
- if an error occurs building the in-memory documentpublic void readTree(java.io.DataInputStream in, java.lang.String systemId, Configuration config, Receiver out) throws java.io.IOException, XPathException
in
- the input stream holding the PTree document. The method will consume the stream;
the caller is responsible for closing the stream after use.systemId
- the base URI to be used for the document associated with this input streamconfig
- the Saxon Configurationout
- the Receiver to receive the document eventsjava.io.IOException
- if an error occurs reading the input streamXPathException
- if an error occurs building the in-memory documentpublic static void main(java.lang.String[] args) throws java.lang.Exception
args
- [-t] source.ptree out.xmljava.lang.Exception
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.