Re: xml-tree over ORBiT?



Petr Tomasek wrote:

> On 22 May 2000, Havoc Pennington wrote:
>
> >
> >Petr Tomasek <tomasek@etf.cuni.cz> writes:
> >>
> >> Is is possible to have (memory representation) of xml-trees
> >> handle in ORBiT. (i.e. having it as input/output of
> >> functions)?
> >>
> >
> >The easiest way with libxml would be to convert the tree to/from a
> >string and send the string via ORBit.
> >
> >Havoc
>
> Ugh.. wouldn't that be too slow and ugly? (Well I'm not against, i'm
> just asking....)

Yep, its slow and ugly and currently the easiest way to stream xml. The
xml-parsing at the receiving end is by far the slowest part. There
exists other
techniques but they are non-standard.

BTW what are your use cases ? Its may be possible to work around the
xml streaming to string with other techniques.


Im currently working on XIOP which is Corba using XML and HTTP
and there I have defined a XML Fragment "stereotype" which is the XIOP
mechanism for encoding raw XML fragment  to streams. The XML Fragment
encoding is currently defined in IDL as:

typedef sequence<octet>     XMLText;
struct XMLBlock {               /* Block of stream data */
    SequenceNo      blockno;    /* Block sequence number. May be used
when handling out of sequence blocks. */
        XMLText         data;       /* actual XML stream data*/
    };
    typedef sequence<XMLBlock>  XMLBlockSeq;

    struct XML_Fragment_1_0 {
        XMLBlockSeq         root_blocks;
    };

The reason why XMLText is defined as octets is that the default code-set
(TCS-C)
for strings is ISO-8859-1 and if you want to transfer other xml
encodings then
you may be in trouble.

/anders
--
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
/  Financial Toolsmiths AB            /
/  Anders W. Tell                     /
/ WWW:  <http://www.toolsmiths.se>    /
/ XIOP: <http://xiop.sourceforge.net> /
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/






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