Re: XML Transform
- From: PiMané <PiMan@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 3 Apr 2007 02:54:00 -0700
Thanks for the advice. I'll try them out.
Pedro
"Michael Rys [MSFT]" wrote:
My apologies for the the late reply. But I was busy ;-).
See below for some answers.
"PiMané" <PiMan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8A665BE9-EBE2-4D28-8DB6-033D1D8E1FEA@xxxxxxxxxxxxxxxx
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 ?
With the exception of the node table and the meta properties @mp:id,
@mp:prev and @mp:parentid nodes() can do all that OpenXML can do.
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?
You could do it in a C# program inside the database. Or you could batch the
insert delete etc...
It depends on the data and the operations though. Best is to prototype both
and try it.
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
- References:
- Re: XML Transform
- From: Michael Rys [MSFT]
- Re: XML Transform
- Prev by Date: Re: Creating correct XML output?
- Next by Date: Re: SSMS Bug with extended properties on xml indexes?
- Previous by thread: Re: XML Transform
- Next by thread: Re: How to get CHAR(32) in the field?
- Index(es):