On Dec 13, 7:00 pm, "Anthony Jones" <A...@yadayadayada.com> wrote:
> "cmt" <chrismt...@gmail.com> wrote in message
>
> news:7f28f716-7b63-4de5-ac57-...> On Dec 13, 4:15 am, "Anthony Jones" <A...@yadayadayada.com> wrote:
> > > "cmt" <chrismt...@gmail.com> wrote in message
>
> news:3c58b08a-8df6-4de7-9edc-...
>
>
>
>
>
> > > > Hi everyone,
>
> > > > I have to perform a database query and write the results to an XML
> > > > file.
>
> > > > I also need to form this XML file with a DTD file.
>
> > > > I'd like to hear some opinions on the best way to do this.
>
> > > > I figured out how to write out just raw XML using adPersistXML. But
> > > > that doesn't really help as the XML needs to conform to the DTD.
>
> > > > I also found a way to write out the XML file line by line
> > > > using .createNode and .appendChild...but that would take forever as
> > > > the database query returns 72 columns.
>
> > > How many rows? How sure are you that it would take too long?
>
> > > What DB? E.g. SQL Servers FOR XML isn't blisteringly quick any way
> (under
> > > the hood I suspect it still uses createNode etc on an MSXML DOM).
>
> > > Have you considered taking the raw XML and using XSL to transform it to
> your
> > > required format with DTD?
>
> > > --
> > > Anthony Jones - MVP ASP/ASP.NET
>
> > This will be written in classic ASP and using SQL Server 2000.
>
> > There will be about 5000 rows in all.
>
> > I'm fairly familiar with XML now, but I really haven't found any
> > resources on how to create XSL from DTD...
>
> > I'd love to be able to take the raw XML and just format it correctly
> > with the required DTD, but knowledge on how to do this is few and far
> > between.
>
> Since taking the Raw XML as an input and getting XML compliant with your DTD
> as an output there is the inescapable requirement for a process to come
> between them. Said process would have to know how to map the raw XML to the
> DTD XML. Since the DTD only defines the output structure but not the input
> the DTD alone is not enough. Even given a definition of the Raw structure
> there is still a need to define the mapping between the two.
>
> XSL is the tool that we use to define the above process.
>
> --
> Anthony Jones - MVP ASP/ASP.NET
Would it help if I had the XSD? I have a DTD and an XSD. Would a
combination of these help with formatting the RAW XML?
Thanks
|