xlst or dom to display search result

M

MD

my database return the search result in the xml.
I have about 100 fields with 10 records if i use
the dom to parse in the browser with javascript
takes about 30 seconds to generate the table
with search result

If i use the xlst to transform this xml document to
table any faster?

if not faster way to display this complicated data with 100 fields?

MD
 
?

=?ISO-8859-1?Q?J=FCrgen_Kahrs?=

MD said:
my database return the search result in the xml.
I have about 100 fields with 10 records if i use
the dom to parse in the browser with javascript
takes about 30 seconds to generate the table
with search result

Please post an example. 100 fields with 10 records
sounds so few that it should be trivial. Such small
files should take around a second to be processed.
 
M

MD

The search result is the collection of metadata and
each metadata item has three item like the following.
I hope you gotta idea. my data has chinese included so
i can't just diplay all.


<metadata>
<item>
<id>iims12345222</id>
<type>STRING</type>
<value>HELLO</value>
</item>
<item>
<id>iims12345222</id>
<type>DOUBLE</type>
<value>123.1234</value>
</item>
<item>
<id>iims12345222</id>
<type>INT</type>
<value>123</value>
</item>
 
?

=?ISO-8859-1?Q?J=FCrgen_Kahrs?=

MD said:
<metadata>
<item>
<id>iims12345222</id>
<type>STRING</type>
<value>HELLO</value>
</item>
<item>
<id>iims12345222</id>
<type>DOUBLE</type>
<value>123.1234</value>
</item>
<item>
<id>iims12345222</id>
<type>INT</type>
<value>123</value>
</item>

With 100 of these items, does it really take
30 seconds for the JavaScript DOM to process
the data ? If so, I would blame the _JavaScript_
implementation of the DOM. So, it makes sense
to try XSLT.
 
M

Martin Honnen

Jürgen Kahrs wrote:

With 100 of these items, does it really take
30 seconds for the JavaScript DOM to process
the data ? If so, I would blame the _JavaScript_
implementation of the DOM.

I don't know of any JavaScript implementation of the DOM. Usually the
DOM is implemented by e.g. browser applications like Mozilla or IE in
C/C++ or by viewers like the Batik Squiggle viewer in Java. Those
applications then host a script engine and expose that DOM to script.

MD, can't you transform your XML on the server to HTML? Whether you use
DOM there or XSLT is probably not necessarily a question of speed but
XSLT is geared towards transforming XML to HTML so doing it with XSLT
might be easier.

On the client using DOM scripting to parse the XML has much wider
support than scripting XSLT client-side.
As for the time you encounter, that sounds odd, even assuming that much
of that time comes from creating and rendering the HTML table and not
from extracting the data from the XML.
If you need help with that then provide more details.
 
M

MD

Thanks both of you for the tips.

I am rechecking my javascript to see if i am doing something wiered
to slow the whole process.

MD.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,005
Messages
2,570,264
Members
46,859
Latest member
HeidiAtkin

Latest Threads

Top