473,493 Members | 4,319 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

70 MB XML String ? XSL Transformation.

CK
Hello,
I have the 60 MB XML string and I am coding a program in Visual Basic
to run a XSL transformation on it. Currently, I'm using the Microsoft
standard MSXML 2.0 to create a DOM document, load the XML, and then
run the XSL transformation on it using the MSXML2.IXSLProcessor
interface.

The problem is that it kills my system because of an incredible amount
of memory that it requires to do this (around 850 MB). Are there any
other transformation methods that I can use in Visual Basic that will
take less memory then DOM?

Or perhaps some other method of transformation that uses SAX as input
rather than a DOM object ?

BTW, can't use .Net

ANy other ideas are appreciated...
Jul 20 '05 #1
7 3231
What about spliting the XML instance into smaller chunks... run them
sequentially and then reassemble them.
"CK" <ck*****@hotmail.com> wrote in message
news:44**************************@posting.google.c om...
Hello,
I have the 60 MB XML string and I am coding a program in Visual Basic
to run a XSL transformation on it. Currently, I'm using the Microsoft
standard MSXML 2.0 to create a DOM document, load the XML, and then
run the XSL transformation on it using the MSXML2.IXSLProcessor
interface.

The problem is that it kills my system because of an incredible amount
of memory that it requires to do this (around 850 MB). Are there any
other transformation methods that I can use in Visual Basic that will
take less memory then DOM?

Or perhaps some other method of transformation that uses SAX as input
rather than a DOM object ?

BTW, can't use .Net

ANy other ideas are appreciated...

Jul 20 '05 #2
how dare you use the words 'visual basic' in this newsgroup. real XML
programmers always use java ;-))

AFAIK all existing XSLT processors use DOM (even the java ones). Because
XSLT allows you to jump all over the document, I think it would be very
difficut to produce one that didn't read the whole document in.

if your transformation is simple, I would suggest not using XSLT for it -
write a sax-based progam that processes it as a stream. (not sure if you can
do this with MSXML)

If you need to jump all over the document to get different parts, I think
you should probably re-atchitect the application to use a XML database or
lots of small pieces of XML held in flat files or RDBMS.

"CK" <ck*****@hotmail.com> wrote in message
news:44**************************@posting.google.c om...
Hello,
I have the 60 MB XML string and I am coding a program in Visual Basic
to run a XSL transformation on it. Currently, I'm using the Microsoft
standard MSXML 2.0 to create a DOM document, load the XML, and then
run the XSL transformation on it using the MSXML2.IXSLProcessor
interface.

The problem is that it kills my system because of an incredible amount
of memory that it requires to do this (around 850 MB). Are there any
other transformation methods that I can use in Visual Basic that will
take less memory then DOM?

Or perhaps some other method of transformation that uses SAX as input
rather than a DOM object ?

BTW, can't use .Net

ANy other ideas are appreciated...

Jul 20 '05 #3
"Andy Fish" <aj****@blueyonder.co.uk> wrote in message
news:wg*********************@news-text.cableinet.net
how dare you use the words 'visual basic' in this newsgroup.
<ignore-irony>What has the programming language of choice to do with
XML? You always have to use *one* language to approach the problem,
don't you?</ignore-irony>
if your transformation is simple, I would suggest not using XSLT for
it - write a sax-based progam that processes it as a stream. (not
sure if you can do this with MSXML)
Of course you can.
If you need to jump all over the document to get different parts, I
think you should probably re-atchitect the application to use a XML
database or lots of small pieces of XML held in flat files or RDBMS.


Yes, sometimes XML ist _not_ the solution. *g*

Martin
Jul 20 '05 #4
"Andy Fish" <aj****@blueyonder.co.uk> schrieb im Newsbeitrag
news:wg*********************@news-text.cableinet.net...
how dare you use the words 'visual basic' in this newsgroup. real XML
programmers always use java ;-))

AFAIK all existing XSLT processors use DOM (even the java ones). Because
XSLT allows you to jump all over the document, I think it would be very
difficut to produce one that didn't read the whole document in.
Actually, must XSLT processors do NOT use DOM. What they use is an internal
representation of the XPath data model, most (*) of the time in RAM.

* one exception seems to be jd.xslt (http://www.aztecrider.com/xslt/).
...


Julian
Jul 20 '05 #5
I stand corrected, thank you

I'm amazed that a 70mb file takes up 800mb of RAM - but then again just
opening it up in notepad would probably take 300mb

"Julian F. Reschke" <re*****@muenster.de> wrote in message
news:bm************@ID-98527.news.uni-berlin.de...
"Andy Fish" <aj****@blueyonder.co.uk> schrieb im Newsbeitrag
news:wg*********************@news-text.cableinet.net...
how dare you use the words 'visual basic' in this newsgroup. real XML
programmers always use java ;-))

AFAIK all existing XSLT processors use DOM (even the java ones). Because
XSLT allows you to jump all over the document, I think it would be very
difficut to produce one that didn't read the whole document in.
Actually, must XSLT processors do NOT use DOM. What they use is an

internal representation of the XPath data model, most (*) of the time in RAM.

* one exception seems to be jd.xslt (http://www.aztecrider.com/xslt/).
...


Julian

Jul 20 '05 #6
"Andy Fish" <aj****@blueyonder.co.uk> wrote in message
news:4q*********************@news-text.cableinet.net
I'm amazed that a 70mb file takes up 800mb of RAM - but then again
just opening it up in notepad would probably take 300mb


If you build a tree of more or less complex objects from the plain text,
it is clear that it eats up more RAM than just reading it into a buffer.

Martin
Jul 20 '05 #7
In article <3f**********************@newsread4.arcor-online.net>,
Martin Boehm <ng********@arcor.de> wrote:
I'm amazed that a 70mb file takes up 800mb of RAM - but then again
just opening it up in notepad would probably take 300mb
If you build a tree of more or less complex objects from the plain text,
it is clear that it eats up more RAM than just reading it into a buffer.


Well, it doesn't have to be *that* much more. Element and attribute
names may be replaced with pointers to shared strings, and whitespace
and syntax characters will be discarded. A tree structure *could*
be smaller than the text.

On the other hand the characters will probably be represented as at
least 16 bits each, maybe 32, depending on the language and
implementation. There will be parent pointers, maybe position
information and so on.

-- Richard
--
Spam filter: to mail me from a .com/.net site, put my surname in the headers.

FreeBSD rules!
Jul 20 '05 #8

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

Similar topics

0
2679
by: Sergio del Amo | last post by:
Hi, I use the xslt functions provided by php. I am running in my computer the package xampp(www.apachefriends.org) which includes php/apache/mysql .. In this package the php includes the sablotron...
4
2417
by: Kevin Dean | last post by:
I'm trying to create an XSL transformation that will strip out development-specific attributes from deployment descriptors and other XML files. I have already successfully done so with web.xml but...
2
4335
by: Sebek | last post by:
Hello, I'm transforming a XML document in XHTML but I have problems using sub-strings, it will be clearer with an exemple: What I have: <form...
4
14216
by: Corey | last post by:
All, I am relatively new to XML and I have what may sound like a dumb question. I want to pass a query string variable to my xml document and filter the output based on that variable. For...
2
1544
by: Stuart | last post by:
I am a bit of a newbie to C# and would like help with the following I am bringing in a dataset and transforming that dataset using an XSL style sheet to generate text. This text does in fact...
2
1798
by: HendrikLeder | last post by:
Hello everybody :-) Next year I`ll write my diploma in computer science for business (It`s a degree in Germany) and I`ve some questions about the topic. The diploma will handle about refactoring...
2
1495
by: darrel | last post by:
I don't do a lot with XML, so I always get a bit lost navigating the XML classes. In the past, I've used this: xslt.Transform(doc, xslArg, Response.Output, Nothing) Which takes my xml file...
1
1784
by: newbie | last post by:
This is probably a too general question, thanks for any feedback in advance. I am trying to write a class to do transformation on a data set. I want to make it easy to maintain in the long-run...
12
1507
by: ramesh54 | last post by:
Hello All, I have a test file z.txt with following lines *transformation X Y Z 10 20 30 Finally i need to have a the same text files as follows,
0
6980
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
7157
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
7192
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...
1
6862
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7364
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5452
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
1397
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.