in reply to XML to SQL - the easy way?

It depends on XML structure and required behaviour, but proper tool to transform XML to anything is XSLT.

Replies are listed 'Best First'.
Re^2: XML to SQL - the easy way?
by Jenda (Abbot) on Jun 10, 2011 at 09:20 UTC

    Yeah, proper tool. XML in XML that XML XML xml to xml in XML and xmls xml xml. Now how do you propose to use XSLT in this case? Write a complicated and fragile template that transforms the XML file into a bunch of INSERT statements (most likely failing to decode and escape the values properly) that you then force the database to parse and execute? Sounds very xmlish to me. XSLT also known as "I was lazy to design a sensible syntax and write a parser so let's force the developers to give us the syntax tree serialized in a format we already have a parser for" is seldom the right tool, but in this case it's simply ... not a good option.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

Re^2: XML to SQL - the easy way?
by DrHyde (Prior) on Jun 10, 2011 at 10:12 UTC
    Ahhh, XSLT. The only language with more brackets than LISP.