Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: how to handle large xml files

From: "mindspring" <ardinnot@-------.--->
To: NULL
Date: 12/2/2006 6:53:00 AM


"Anthony Jones" <Ant@y...> wrote in message 
news:up2rZgZFHHA.420@T......
>
> "mindspring" <ardinnot@h...> wrote in message
> news:GZ0ch.5415$sf5.2581@n......
>> How does one parse a huge xml file?
>> I am using asp / vba and msxml 4
>>
>> using declaration as
>> Dim oXMLHTTP As MSXML2.ServerXMLHTTP40
>>    Set oXMLHTTP = New MSXML2.ServerXMLHTTP40
>>
>> so you get the idea of what parser I use.
>>
>> What do you think?
>> this works for small files, but the huge ones crash my system.
>>
>
> Define huge?
>
> Your only other realistic option is to use WinHTTP in asynchonous mode and
> push the bytes through SAX in some way.  What are you did you intent to do
> with the data once you have parsed it into XML?
>
>
>> Thanks
>>
>>
>
>
here is the code I use:

theurl = 'the url to the xml file'


Dim oXMLHTTP As MSXML2.ServerXMLHTTP40
   Set oXMLHTTP = New MSXML2.ServerXMLHTTP40

   With oXMLHTTP
       .setTimeouts 30000, 30000, 120000, 300000
       .Open "POST", theurl, , "username", "password"
       .setRequestHeader "CONTENT-TYPE", "application/x-
www-form-urlencoded"
       .send
       strresult = .responseText
   End With

 strfile = strresult


test.loadXML strfile

--------------
I guess the above just loads the big xml file into memory first, then my 
parser will go through it.
When I parse, it just store into an mdb table, but it just kills the pc.  I 
wish I could somehow save bits to the hard drive as I read in or something. 
I will looking into the sax...I do also have the problem of msaccess failing 
when the records are more than a few thousand, so I guess can use sql or 
mysql client on the pc and an ms access front end? how to do?

Thanks




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent