|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.umlv.tatoo.runtime.ast.XML
public class XML
This class contains static methods usefull for serialize/deserialize an AST.
Method Summary | |
---|---|
static SAXSource |
createSAXSource(Node node)
Returns a SAXSource that can be using as an input of a transform operation on an XML Transformer. |
static void |
serialize(Writer writer,
Node node)
Writes the node and all it's subnode in XML on the writer. |
static void |
transform(Node node,
Result result)
Apply an identity transformation on the AST views as an XML tree. |
static Node |
unserialize(Reader reader,
XMLNodeFactory builder)
De-serialize an XML reader to an AST. |
static Node |
unserialize(Reader reader,
XMLNodeFactory builder,
StringConverter converter)
De-serialize an XML reader to an AST. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void serialize(Writer writer, Node node) throws IOException
writer
- the writer used to write the XML tree.node
- the root of the AST.
IOException
- raised on a error of the underlying writer.createSAXSource(Node)
,
transform(Node,Result)
public static SAXSource createSAXSource(Node node)
node
- root of the AST.
transform(Node, Result)
,
Transformer.transform(javax.xml.transform.Source, Result)
public static void transform(Node node, Result result) throws TransformerConfigurationException, TransformerException
fr.umlv.tatoo.runtime.ast.Node astToot=... DOMResult result=new DOMResult(); XML.transform(root,result); org.w3c.dom.Node domRoot=result.getNode();
node
- the root of the AST.result
- a transformation result.
TransformerConfigurationException
- if no transformer available.
TransformerException
- if the transformer issue an error.createSAXSource(Node)
public static Node unserialize(Reader reader, XMLNodeFactory builder) throws IOException
reader
- the reader containing XML.builder
- the builder used to create AST node.
IOException
- if an error occured on the underlying reader.unserialize(Reader,XMLNodeFactory,StringConverter)
public static Node unserialize(Reader reader, XMLNodeFactory builder, StringConverter converter) throws IOException
reader
- the reader containing XML.builder
- the builder used to create AST node.converter
- used to transforme XML attribute avlue to AST attibute object.
IOException
- if an error occured on the underlying reader.unserialize(Reader,XMLNodeFactory,StringConverter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |