Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > scalable xml

Reply
Thread Tools

scalable xml

 
 
hyperboreean
Guest
Posts: n/a
 
      05-21-2008
Hi, I am writing the application server for a three-tier architecture
and sending the client's response in xml. My question is: is there a way
to build the xml dom in a more scalable way and faster way than just
creating every textNode and element for it? I have tons of data to
transmit and it drives me crazy having to build that dom manually.

I am not sure if this is a stupid question as I don't know other
alternatives ... maybe just provide a template xml which I can fill with
data but that can introduce some pretty ugly bugs in the application.


Thanks.

 
Reply With Quote
 
 
 
 
Diez B. Roggisch
Guest
Posts: n/a
 
      05-21-2008
hyperboreean wrote:

> Hi, I am writing the application server for a three-tier architecture
> and sending the client's response in xml. My question is: is there a way
> to build the xml dom in a more scalable way and faster way than just
> creating every textNode and element for it? I have tons of data to
> transmit and it drives me crazy having to build that dom manually.
>
> I am not sure if this is a stupid question as I don't know other
> alternatives ... maybe just provide a template xml which I can fill with
> data but that can introduce some pretty ugly bugs in the application.


You should have a look at the ElementTree-package (which also comes
api-compatible as lxml). These allow for a much more pythonic way of
creating XML-trees.

However you might consider using a much more concise format such as json for
transport (if you have control over the client). It reduces the data-amount
to about a tenth or so (of course depending on your xml-dialect), with
considerable gains in processing time.

And then there in fact are some template languages such as KID and genshi
that might suit you because they enforce proper XML.

Diez
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Scalable Application Design =?Utf-8?B?VGVycnkgSG9sbGFuZA==?= ASP .Net 3 03-18-2006 08:19 AM
Scalable fonts in nested lists... Curtis HTML 13 12-21-2005 08:15 PM
Scalable web architecture with ASP.NET 2.0 =?Utf-8?B?QnJlbnQgQm9yb3Zhbg==?= ASP .Net 3 12-12-2005 05:12 PM
scalable state-management John Grandy ASP .Net 1 03-18-2005 02:52 PM
help request: css positioning & text bg scalable image Ilya HTML 9 06-30-2004 02:24 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57