Re: XML Transform

Tech-Archive recommends: Fix windows errors by optimizing your registry



I dont pass the XSLT as a parameter to the C# beacause they are store in the
same database. I have a table that has the XSLT and the information level (we
have serveral XSLT according to the information level bought by the
subscriber. we have 3 XSLT that we apply to the XML Document received).
But I can get all the XSLT with a stored procedure and pass that has
parameter to the C# and send the original document and all the other
documents with the XSLT applied to another SP that stores the info in the
database.

Has the nodes() method the same capabilities has the OPENXML ?

Thanks for the advice...

I have another question....
I have an item holder that has multiple items (up to 10.000 or more). We I
give a delete order of the item holder I have to get all the items and create
a XML document with the delete order. I use a SP that gets all the items and
uses the modify() method with the replace, insert and delete to create the
XML document and insert it in the database.
Is it also better to have that in the C# program? C# handles better and
faster the XML treatment. The problem is that I'd have to get 10.000 items in
the SP and call a SP 10.000 times to insert the new XML document in the
database... What's the best way to do this kind of things? Is SQL Server 2005
"good" enough to handle XML this way?

Thanks in advance,
Pedro

"Michael Rys [MSFT]" wrote:

You may want to look into the nodes() method instead of OpenXML. That should
scale better.

Also, why aren't you passing the XSLT stylesheets as parameters to the C#
program?

Best regards
Michael

"PiMané" <PiMan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:89A9980F-1507-4523-8653-F0D9DA8736C3@xxxxxxxxxxxxxxxx
Hi,

I'm using a CLR to transform XML with a given XSL style*** in SQL Server
2005.
I call a C# programa to use a store procedure with a XML document and in
the
sp I use serveral XSL to transform that XML, beacause we have multiple
level
of information, an store it in a table.
Is it better to do like that or should the C# program call a sp to get all
the XSL and do the transformation in C# and not in SQL Server, and call
the
sp with the XML already transformed and store it.

I'd like also to know if the sp_xml_preparedocument and the OPENXML is
efficient and fast. I use it beacause we get a XML document with multiple
ids
to remove from a table. I use the OPENXML to cross the information with
the
table and delete the records (all this in a sp). The other solution we
have
is to process the XML in C# and call multiple times a sp and delete each
record at a time, which makes multiple connections to the database. Are we
using the correct method?

Thanks in advance,
Pedro Oliveira



.


Quantcast