473,387 Members | 1,374 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

XSLT Large xml files

I am currently using JDOM to access a rather large xml document(2mb).
JDOM is taking up too much memory, I am looking for somethng that
is more light weight.

I know that SAX will work, but I would rather uses something like
xslt since I'm tranforming the xml document into HTML. Don't
ask me why they want to transform such a large document into HTML,
especially considering the resultant HTML is going to be over 20meg.
That is what the customer wants...

So, is XSLT suitable for this type of thing, or is it going to
end up loading up the entire document into memory?

Raj
Jul 20 '05 #1
3 3627


Rajesh Patel wrote:
I am currently using JDOM to access a rather large xml document(2mb).
JDOM is taking up too much memory, I am looking for somethng that
is more light weight.

I know that SAX will work, but I would rather uses something like
xslt since I'm tranforming the xml document into HTML. Don't
ask me why they want to transform such a large document into HTML,
especially considering the resultant HTML is going to be over 20meg.
That is what the customer wants...

So, is XSLT suitable for this type of thing, or is it going to
end up loading up the entire document into memory?


XSLT builds a tree of the document so yes, it loads the entire document
into memory however depending on the implementation it might not use a
usual DOM tree but something lighter.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
Rajesh Patel (Mon, 28 Jun 2004 18:00:19 GMT):
I am currently using JDOM to access a rather large xml document(2mb).
JDOM is taking up too much memory, I am looking for somethng that
is more light weight.
I use libxml2 (wrapped in pyhton) with a slightly larger document
(120 MB ;-)

It takes 400 MB memory.
So, is XSLT suitable for this type of thing, or is it going to
end up loading up the entire document into memory?


XLSTing a 3 MB sized document into an other 3 MB sized document can be
done with libxsl (of the libxml2-project) within practically no time (2
or 3 seconds) and 30 MB of RAM.

A good approximation is: 4x(size inpzt + size output) bytes memory.
Chris
--
Chris Huebsch www.hübsch-gemacht.de | TU Chemmnitz, Informatik, RNVS
GPG-Encrypted mail welcome! ID:7F2B4DBA | Str. d. Nationen 62, B204
Chemnitzer Linux-Tage 2005, 5.-6.März | D-09107 Chemnitz
http://www.tu-chemnitz.de/linux/tag/ | +49 371 531-1377, Fax -1803
Jul 20 '05 #3
Off hand the problem probably isn't JDOM ...

The problem is that the JDOM solution that you envision reads a
20 MB file and then attempts to transform the thing in one shot.

You need to read the file element by element and then transform
element by element.
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Mikko Nummelin | last post by:
As the XSLT namespace is declared to be used in XSL documents like this: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> , isn't this a risky practice as it...
0
by: alex | last post by:
I'm new to xslt, and I am attempting to use it to produce a comma-separated-value file from a large, dynamically-generated data file formatted in xml (examples of the xml file and my xslt style...
5
by: Mike Judkins | last post by:
I'm looking for examples of websites (preferably large and well known companies, not personal sites or developer-to-developer sites) that use XML and XSLT as a technology platform from which to...
1
by: cybersattva | last post by:
Hi everyone, I have some pretty mongo XML source files (say 256MB or so) that I need to run an XSL transform on. The transform works fine when the file has only one or two records in it, but...
0
by: Nithya Sampathkumar | last post by:
Hi, We are planning what features /improvements need to go in the next release for XSLT. We are making these decisions based on customer input and feedback. So I would like to hear your views on...
3
by: Ian Roddis | last post by:
Hello, I want to embed SQL type queries within an XML data record. The XML looks something like this: <DISPLAYPAGE> <FIELD NAME="SERVER" TYPE="DROPDOWN"> <OPTION>1<OPTION> <OPTION>2<OPTION>...
1
by: Bilal Bhutta | last post by:
Hello, I'm stuck on this problem for quite some time and hope somebody would be able to guide me. Basically, I need to populate a large number of "template" XML files which have all...
2
by: killy971 | last post by:
I have been testing different libraries to process XSL transformations on large XML files. The fact is that I read a document from Intel, stating their library (XSLT accelerator) was more twice...
12
by: Stu | last post by:
Being a newbie with XSLT transformation code please excuse my neivte. In addition, I am not sure what I want to do can be done with xslt so I apologize up front for asking anything stupid I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.