You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Mel <me...@csn.ul.ie> on 2000/09/20 20:35:31 UTC

Printing DOM tree

Is how DOMPrint.cpp in samples/ honestly the only way to print out a DOM
tree? I'm new (which is why this is probably a moron question) to XML and
Xerces so I found it suprising there wasn't a render function or something
similar for printing out the tree. 

I want to create a DOM tree and then print it out as normal XML. Please
say there is an easier way to do it than assulting DOMPrint :-)

Thanks and apologies if this is exceptionally stupid or on the wrong list.

			Mel


Re: Printing DOM tree

Posted by Dean Roddey <dr...@charmedquark.com>.
Override to do what? If you set up an output stream to ostream, then you can
build it on any system that doesn't have ostreams, such as embedded system
perhaps. Don't use std:: and people will have to have a using clause if they
use the new streams, which will expose the entire std namespace into their
code. If you do use std::, then people who don't have namespace support or
the new libraries can't use it. What if they don't want to use a standard
stream and want to use something else?

Anyway, there are a lot of issues involved with a product with this wide
portability and applicability. This is why it traditionally took a 'self
contained' approach and used as little of the standard libs as practical.
And that was why I did the XMLFormatter/XMLFormatterTarget type scheme,
becuase that decouples the parser from the actual means of getting the data
out.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"It takes two buttocks to make friction"
    - African Proverb


----- Original Message -----
From: "Frank Fabbrocino" <fr...@checkout.com>
To: <xe...@xml.apache.org>
Sent: Wednesday, September 20, 2000 12:21 PM
Subject: RE: Printing DOM tree


> It would seem to me that the overloading of the ostream << operator
> would be a given, but looking at the example code, it isn't. Also, the
> output from DOMPrint doesn't format the XML in any way.
>
> Later,
> Frank
>
> -----Original Message-----
> From: Mel [mailto:mel@csn.ul.ie]
> Sent: Wednesday, September 20, 2000 11:36 AM
> To: xerces-c-dev@xml.apache.org
> Subject: Printing DOM tree
>
>
>
> Is how DOMPrint.cpp in samples/ honestly the only way to print out a
> DOM
> tree? I'm new (which is why this is probably a moron question) to XML
> and
> Xerces so I found it suprising there wasn't a render function or
> something
> similar for printing out the tree.
>
> I want to create a DOM tree and then print it out as normal XML.
> Please
> say there is an easier way to do it than assulting DOMPrint :-)
>
> Thanks and apologies if this is exceptionally stupid or on the wrong
> list.
>
> Mel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>


RE: Printing DOM tree

Posted by Frank Fabbrocino <fr...@checkout.com>.
It would seem to me that the overloading of the ostream << operator
would be a given, but looking at the example code, it isn't. Also, the
output from DOMPrint doesn't format the XML in any way.

Later,
Frank

-----Original Message-----
From: Mel [mailto:mel@csn.ul.ie]
Sent: Wednesday, September 20, 2000 11:36 AM
To: xerces-c-dev@xml.apache.org
Subject: Printing DOM tree



Is how DOMPrint.cpp in samples/ honestly the only way to print out a
DOM
tree? I'm new (which is why this is probably a moron question) to XML
and
Xerces so I found it suprising there wasn't a render function or
something
similar for printing out the tree.

I want to create a DOM tree and then print it out as normal XML.
Please
say there is an easier way to do it than assulting DOMPrint :-)

Thanks and apologies if this is exceptionally stupid or on the wrong
list.

			Mel


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org