Re: [gdome]which GDdome API makes carriage-return(new line) per a xml line ?



On Tue, 13 Nov 2001, Jenny B. Kim wrote:

> Hi, I am a newbie for GDome .
> Thesedays..I am doing a generation of XML file using Gdome API.
> 
> I almost done that...but...I have no idear......about as follows.
> 
> The result XML file looks like that :
> <?xml version="1.0"?>
> <TEST><NODE1/><NODE2><NODE3><NODE4/><NODE5/></NODE3></NODE2></TEST>
> 
> But...I wanna make much Hierarchical arranged XML file such as bellow.
> <?xml version="1.0" ?>
> <TEST>
>         <NODE1/>
>         <NODE2/>
>           ............
> </TEST>
> 1> Anyone know how to make like this way ?
The output is correct, if you want indentation you have to had
it: indentation text are text node.
To save a document to a File you have to use gdome_di_saveDocToFile: this
API have a field called mode that can be GDOME_SAVE_STANDARD (that
generate the output you have experienced) or GDOME_SAVE_LIBXML_INDENT. The
last one had a very simple indentation that sometimes is enough.

> 2> and one more question. How can I input encoding attributes into the 1st line.
>      -- example :     <?xml version="1.0" encoding="UTF-8">
It's impossible for the moment: a future version will support all the
encoding of the underling libxml2 lib.


Bye,
  paolo.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]