Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: how to handle large xml files >Thread Next - Re: how to handle large xml files Re: how to handle large xml filesTo: 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
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
