Thanks Michael, it worked as with your first option:
ValueRepresentation state = ...
TransformerFactory tf= TransformerFactory.newInstance();
Transformer t = tf.newTransformer();
t.transform((NodeInfo)state,new StreamResult(System.out));
/Enric
On Tue, 5 Dec 2006, Michael Kay wrote:
>
> The cleanest way is probably to do a JAXP identity transformation. The
> TinyElement implements the Source interface, so you can do
>
> Transformer t = tfactory.getTransformer();
> t.transform(element, new StreamResult(System.out));
>
> Alternatively use the static method:
>
> QueryResult.serialize(element, new StreamResult(System.out), new
> Properties(), element.getConfiguration());
>
> (Looking at this I've no idea why the fourth argument is needed since the
> configuration can always be obtained from the node!).
>
> Michael Kay
> http://www.saxonica.com/
>
>
> > -----Original Message-----
> > From: saxon-help-bounces@...
> > [mailto:saxon-help-bounces@...] On Behalf
> > Of Enric Jaen
> > Sent: 05 December 2006 01:35
> > To: saxon-help@...
> > Subject: [saxon] how to dump TinyElement
> >
> > Hi, I have a ValueRepresentation which represents a
> > TinyElementImpl. How can I print into console (or file) the
> > tree. I don't mean the string value, but the whole tree.
> > Thanks for your help.
> > /Enric
> >
> >
> >
> > --------------------------------------------------------------
> > -----------
> > Take Surveys. Earn Cash. Influence the Future of IT Join
> > SourceForge.net's Techsay panel and you'll get the chance to
> > share your opinions on IT & business topics through brief
> > surveys - and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge
> &CID=DEVDEV
> > _______________________________________________
> > saxon-help mailing list
> > saxon-help@...
> > https://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
|