Josip Habjan wrote:
Hi,
You dont need to parse XML outside of stored procedure.. Just send XML to
stored procedure (text param).. and use 'sp_xml_preparedocument' and
'OPENXML' for inserting xml data to table.i need to parse an xml file and insert the values into mssql, i was
thinking
of creating an object that will hold the values before inserting them and
do
some validation on them when done parsing i loop thru that object and
insert
them ..
anyone has some idea or code that can help please email me at
Personally I would stick to your original idea. Have an object that
parses the XML an to produce the values. Then have a separate object
that builds the SQL based on the values. That way your SQL building is
not coupled to the values coming from XML, they can come from anywhere.
Cheers
Jimbo