c# - Approach for performing XSLT transformation on SQL Server -


i trying perform xslt transformation converting xml different xml format. using xslt extension objects perform data mapping operations during transformation.

i have mentioned cut down version of xml formats below. there mapping table maps supplier product code productid in system. while transforming use extension objects such mapping operations.

this works till time big xml document couple of 1000's of detail nodes in it. in such scenario extension object have performance impact.

i wondering whether can shift xslt transformation sql server , handle data mapping operation @ db level rather making individual db call extension objects?

source xml document

<suppliersdocument>   <supplierproducts>     <product>       <productcode>a001</productcode>       <uom>kg</uom>     </product>     <product>       <productcode>a002</productcode>       <uom>ml</uom>     </product>     <product>       <productcode>a003</productcode>       <uom>ea</uom>     </product>   </supplierproducts> </suppliersdocument> 

target xml document

<mydocument>   <products>     <product>       <productid>998998</productid>       <unitofmeasurementid>1</unitofmeasurementid>     </product>     <product>       <productid>885855</productid>       <unitofmeasurementid>2521</unitofmeasurementid>     </product>     <product>       <productid>225235</productid>       <unitofmeasurementid>5542</unitofmeasurementid>     </product>   </products> </mydocument> 

if you're not doing so, should in ssis, not in sql server itself.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -