Re: Parsing large amounts of data (200,000 entries) with XML?
From: Joseph M. Ferris (josephmferris_at_cox.net)
Date: 03/17/04
- Next message: Joseph M. Ferris: "Re: Parsing large amounts of data (200,000 entries) with XML?"
- Previous message: Kit Truong: "BUILD UPDATE QUERY WITH VB"
- In reply to: Bonj: "Re: Parsing large amounts of data (200,000 entries) with XML?"
- Next in thread: Joseph M. Ferris: "Re: Parsing large amounts of data (200,000 entries) with XML?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 17 Mar 2004 15:31:50 -0700
Bonj wrote:
> Right, so the XML file contains the data, the XSL file contains the
> formatting and style options...OK, just a couple of questions:
> a) presumably now then, I can fairly easily enough generate a routine that
> will programatically generate an XML file for whatever data I want that is
> in the form of an SQL-generated recordset (also see my other post - does SQL
> server do this automatically if I set it up right maybe?)
SQL Server currently can do this without any configuration changes.
Actually, it is ADO that does it. ;-) ADO can persist a recordset
directly to XML since version 2.5, I believe.
Once you retrieve a recordset, you can save it via:
rstMyRecordset.save "myxmldocument.xml", adPersistXML
or
rstMyRecordset.save stmLocalStream, adPersistXML
It will treat a string as the first argument as a physical location to
save a file to and an ADO Stream object as a place to write the XML to
directly.
> b) Can I do something similar for the XSL file, in a similar way in which if
> I wanted to generate some HTML I might use FrontPage?
Sorry, I am not sure what you mean here. I have not used FrontPage or
FrontPage Extensions. If you are asking if you can generate an XSL on
the fly, the answer would be yes. An XSL is a well-formed XML document,
so you can build and load it directly into the parser.
> c) I notice that you use the save method of the DOMDocument30 - if I wanted
> to use such methods in an ASP-style system, would I write to a temporary
> file on the web server, or does it have some other method for generating the
> text?
Actually, this sample is the first one I posted. I made a couple of
revisions to it since then. As opposed to saving the result with the
parser, I would recommend either using an ADO Stream object or regular
disk i/o, since the parser was not friendly to Larry's HTML results with
non-breaking spaces. FWIW, if you would use the save method of the
parser on the server, it would save the file locally to the server.
The full listing with all of the current code is in this post (made just
for you - it uses late binding <g>):
--Joseph
- Next message: Joseph M. Ferris: "Re: Parsing large amounts of data (200,000 entries) with XML?"
- Previous message: Kit Truong: "BUILD UPDATE QUERY WITH VB"
- In reply to: Bonj: "Re: Parsing large amounts of data (200,000 entries) with XML?"
- Next in thread: Joseph M. Ferris: "Re: Parsing large amounts of data (200,000 entries) with XML?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|