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 "Leonardo B. Lopes" <le...@iems.nwu.edu> on 2002/02/22 21:46:37 UTC
Formatting XML
Dear Friends,
I was able to compile the DOMSerializer module, and build my
<otherformat>2xml converter. That's good. Thanks to Evert for the good
work... But the output is not formatted at all. I see there are a lot of
flags in the code, but the docs don't say anything about being able to
format the xml. There is a java DOMSerialize interface which has members
like "_indent", etc..., that give the programmer some control over output.
Is there something like that in the C++ interface? I tried changing the
"escape flags" but that didn't work...
Thanks!
Leo.
========================================================================
Leonardo B. Lopes leo@iems.nwu.edu
Ph.D. Student (847)491-8470
IEMS - Northwestern University http://www.iems.nwu.edu/~leo
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Formatting XML
Posted by "Leonardo B. Lopes" <le...@iems.nwu.edu>.
THat shouldn't be hard to do, although I don't know how to do it right
now. If you don't want to figure it out yourself, you can always link both
classes into your code and use one or the other to implement your option.
I'm sure soon someone will add this option in a more elegant way. Another
option I would like to see is the ability to add a certain set of nodes
that should *not* be indented.
On Wed, 27 Feb 2002 taraben.a@wige-data.de wrote:
> Hi,
>
> as the number of whitechars (indending) is not defined in XML standard I
> would prefer that this is an _OPTION_ in the serializer class.
> We have the request from our customer not to generate whitechars in the
> XML-stream.
>
>
> Adib.
>
> Leonardo B. Lopes wrote:
> > Hi, evert!
> >
> > Thanks! Actually I changed the source of your class so as to
> > create indentation. Probably a better way to do it would have been to add
> > modifiers to the XMLformatter obj, but I did it directly in DOMSerializer.
> > I can post the code if it is useful to others or if someone wants to fix
> > it so that it does the right thing...
> >
> > Leo.
> >
> > On Tue, 26 Feb 2002, Evert Haasdijk wrote:
> >
> >
> >>Leo,
> >>
> >>Indeed, the serializer does not format the document. I have a small utility
> >>that does that separately, which I attach - it inserts whitespace as needed.
> >>It's very straightforward, but it may serve your purpose.
> >>
> >>Share & enjoy
> >>
> >>Ta, evert
> >>
> >>
> >>
> >>-----Original Message-----
> >>From: Leonardo B. Lopes [mailto:leo@iems.nwu.edu]
> >>Sent: Friday, February 22, 2002 9:47 PM
> >>To: xerces-c-dev@xml.apache.org
> >>Subject: Formatting XML
> >>
> >>
> >>Dear Friends,
> >>
> >> I was able to compile the DOMSerializer module, and build my
> >><otherformat>2xml converter. That's good. Thanks to Evert for the good
> >>work... But the output is not formatted at all. I see there are a lot of
> >>flags in the code, but the docs don't say anything about being able to
> >>format the xml. There is a java DOMSerialize interface which has members
> >>like "_indent", etc..., that give the programmer some control over output.
> >>Is there something like that in the C++ interface? I tried changing the
> >>"escape flags" but that didn't work...
> >>
> >>Thanks!
> >>Leo.
> >>
> >>========================================================================
> >>Leonardo B. Lopes leo@iems.nwu.edu
> >>Ph.D. Student (847)491-8470
> >>IEMS - Northwestern University http://www.iems.nwu.edu/~leo
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> >>For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >>
> >>
> >>
> >
> > ========================================================================
> > Leonardo B. Lopes leo@iems.nwu.edu
> > Ph.D. Student (847)491-8470
> > IEMS - Northwestern University http://www.iems.nwu.edu/~leo
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>
========================================================================
Leonardo B. Lopes leo@iems.nwu.edu
Ph.D. Student (847)491-8470
IEMS - Northwestern University http://www.iems.nwu.edu/~leo
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Formatting XML
Posted by ta...@wige-data.de.
Hi,
as the number of whitechars (indending) is not defined in XML standard I
would prefer that this is an _OPTION_ in the serializer class.
We have the request from our customer not to generate whitechars in the
XML-stream.
Adib.
Leonardo B. Lopes wrote:
> Hi, evert!
>
> Thanks! Actually I changed the source of your class so as to
> create indentation. Probably a better way to do it would have been to add
> modifiers to the XMLformatter obj, but I did it directly in DOMSerializer.
> I can post the code if it is useful to others or if someone wants to fix
> it so that it does the right thing...
>
> Leo.
>
> On Tue, 26 Feb 2002, Evert Haasdijk wrote:
>
>
>>Leo,
>>
>>Indeed, the serializer does not format the document. I have a small utility
>>that does that separately, which I attach - it inserts whitespace as needed.
>>It's very straightforward, but it may serve your purpose.
>>
>>Share & enjoy
>>
>>Ta, evert
>>
>>
>>
>>-----Original Message-----
>>From: Leonardo B. Lopes [mailto:leo@iems.nwu.edu]
>>Sent: Friday, February 22, 2002 9:47 PM
>>To: xerces-c-dev@xml.apache.org
>>Subject: Formatting XML
>>
>>
>>Dear Friends,
>>
>> I was able to compile the DOMSerializer module, and build my
>><otherformat>2xml converter. That's good. Thanks to Evert for the good
>>work... But the output is not formatted at all. I see there are a lot of
>>flags in the code, but the docs don't say anything about being able to
>>format the xml. There is a java DOMSerialize interface which has members
>>like "_indent", etc..., that give the programmer some control over output.
>>Is there something like that in the C++ interface? I tried changing the
>>"escape flags" but that didn't work...
>>
>>Thanks!
>>Leo.
>>
>>========================================================================
>>Leonardo B. Lopes leo@iems.nwu.edu
>>Ph.D. Student (847)491-8470
>>IEMS - Northwestern University http://www.iems.nwu.edu/~leo
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
>>For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>>
>>
>>
>
> ========================================================================
> Leonardo B. Lopes leo@iems.nwu.edu
> Ph.D. Student (847)491-8470
> IEMS - Northwestern University http://www.iems.nwu.edu/~leo
>
>
>
> ---------------------------------------------------------------------
> 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: Formatting XML
Posted by "Leonardo B. Lopes" <le...@iems.nwu.edu>.
Hi, evert!
Thanks! Actually I changed the source of your class so as to
create indentation. Probably a better way to do it would have been to add
modifiers to the XMLformatter obj, but I did it directly in DOMSerializer.
I can post the code if it is useful to others or if someone wants to fix
it so that it does the right thing...
Leo.
On Tue, 26 Feb 2002, Evert Haasdijk wrote:
> Leo,
>
> Indeed, the serializer does not format the document. I have a small utility
> that does that separately, which I attach - it inserts whitespace as needed.
> It's very straightforward, but it may serve your purpose.
>
> Share & enjoy
>
> Ta, evert
>
>
>
> -----Original Message-----
> From: Leonardo B. Lopes [mailto:leo@iems.nwu.edu]
> Sent: Friday, February 22, 2002 9:47 PM
> To: xerces-c-dev@xml.apache.org
> Subject: Formatting XML
>
>
> Dear Friends,
>
> I was able to compile the DOMSerializer module, and build my
> <otherformat>2xml converter. That's good. Thanks to Evert for the good
> work... But the output is not formatted at all. I see there are a lot of
> flags in the code, but the docs don't say anything about being able to
> format the xml. There is a java DOMSerialize interface which has members
> like "_indent", etc..., that give the programmer some control over output.
> Is there something like that in the C++ interface? I tried changing the
> "escape flags" but that didn't work...
>
> Thanks!
> Leo.
>
> ========================================================================
> Leonardo B. Lopes leo@iems.nwu.edu
> Ph.D. Student (847)491-8470
> IEMS - Northwestern University http://www.iems.nwu.edu/~leo
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
========================================================================
Leonardo B. Lopes leo@iems.nwu.edu
Ph.D. Student (847)491-8470
IEMS - Northwestern University http://www.iems.nwu.edu/~leo
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
RE: Formatting XML
Posted by Evert Haasdijk <ev...@zukkespijkers.nl>.
Leo,
Indeed, the serializer does not format the document. I have a small utility
that does that separately, which I attach - it inserts whitespace as needed.
It's very straightforward, but it may serve your purpose.
Share & enjoy
Ta, evert
-----Original Message-----
From: Leonardo B. Lopes [mailto:leo@iems.nwu.edu]
Sent: Friday, February 22, 2002 9:47 PM
To: xerces-c-dev@xml.apache.org
Subject: Formatting XML
Dear Friends,
I was able to compile the DOMSerializer module, and build my
<otherformat>2xml converter. That's good. Thanks to Evert for the good
work... But the output is not formatted at all. I see there are a lot of
flags in the code, but the docs don't say anything about being able to
format the xml. There is a java DOMSerialize interface which has members
like "_indent", etc..., that give the programmer some control over output.
Is there something like that in the C++ interface? I tried changing the
"escape flags" but that didn't work...
Thanks!
Leo.
========================================================================
Leonardo B. Lopes leo@iems.nwu.edu
Ph.D. Student (847)491-8470
IEMS - Northwestern University http://www.iems.nwu.edu/~leo
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org