|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.process.TransformXML
public class TransformXML
Reads XML from an input file or stream and writes XML to an output
file or stream, while transforming text appearing inside specified
XML tags by applying a specified
. See TransformXMLApplications for examples.
Function
Nested Class Summary | |
---|---|
static class |
TransformXML.SAXInterface
|
Constructor Summary | |
---|---|
TransformXML()
|
Method Summary | |
---|---|
void |
transformXML(String[] tags,
Function fn,
File in)
Read XML from the specified file and write XML to stdout, while transforming text appearing inside the specified XML tags by applying the specified . |
void |
transformXML(String[] tags,
Function fn,
File in,
File out)
Read XML from the specified file and write XML to specified file, while transforming text appearing inside the specified XML tags by applying the specified . |
void |
transformXML(String[] tags,
Function fn,
InputStream in)
Read XML from input stream and write XML to stdout, while transforming text appearing inside the specified XML tags by applying the specified . |
void |
transformXML(String[] tags,
Function fn,
InputStream in,
OutputStream out)
Read XML from input stream and write XML to output stream, while transforming text appearing inside the specified XML tags by applying the specified . |
void |
transformXML(String[] tags,
Function fn,
InputStream in,
OutputStream out,
TransformXML.SAXInterface handler)
Read XML from input stream and write XML to output stream, while transforming text appearing inside the specified XML tags by applying the specified . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransformXML()
Method Detail |
---|
public void transformXML(String[] tags, Function fn, File in)
Function
. Note that the Function
you supply must be prepared to accept String
s as
input; if your Function
doesn't handle
String
s, you need to write a wrapper for it that
does.
tags
- an array of String
s, each an XML tag
within which the transformation should be appliedfn
- the Function
to applyin
- the File
to read frompublic void transformXML(String[] tags, Function fn, InputStream in)
Function
.
Note that the Function
you supply must be
prepared to accept String
s as input; if your
Function
doesn't handle String
s, you
need to write a wrapper for it that does.
tags
- an array of String
s, each an XML tag
within which the transformation should be appliedfn
- the Function
to applyin
- the InputStream
to read frompublic void transformXML(String[] tags, Function fn, File in, File out)
Function
.
Note that the Function
you supply must be
prepared to accept String
s as input; if your
Function
doesn't handle String
s, you
need to write a wrapper for it that does.
tags
- an array of String
s, each an XML tag
within which the transformation should be appliedfn
- the Function
to applyin
- the File
to read fromout
- the File
to write topublic void transformXML(String[] tags, Function fn, InputStream in, OutputStream out)
Function
.
Note that the Function
you supply must be
prepared to accept String
s as input; if your
Function
doesn't handle String
s, you
need to write a wrapper for it that does.
tags
- an array of String
s, each an XML tag
within which the transformation should be appliedfn
- the Function
to applyin
- the InputStream
to read fromout
- the OutputStream
to write topublic void transformXML(String[] tags, Function fn, InputStream in, OutputStream out, TransformXML.SAXInterface handler)
Function
.
Note that the Function
you supply must be
prepared to accept String
s as input; if your
Function
doesn't handle String
s, you
need to write a wrapper for it that does.
tags
- an array of String
s, each an XML tag
within which the transformation should be appliedfn
- the Function
to applyin
- the InputStream
to read fromout
- the OutputStream
to write tohandler
- the sax handler you would like to use (default is SaxInterface, defined in this class, but you may define your own handler)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |