Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Removing xmlns="" in child tags and elements


Removing xmlns="" in child tags and elements

Author
Message
er.lokeshsharma08
er.lokeshsharma08
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 125
Hi There,

I had hard time generating xml through a sql stored proc and using it inside ssis package for saving. I must say that it is a very good learning curve. I am able to generate xml, only thing is I am having is xmlns="" namespace in some of my tags. How do I get rid of it. Here is the approach that I am following:-

1. Using an stored proc to generate xml data :-

1.a using 'for xml' explicit with all the data combined in CTE.
1.b I need some run time data in some tags, so I am using a staging table inside stored proc with xml datatype.
1.c Joing this staging table within the cte
1.d at the end I get xml data in form of a unitext string

2. Using ado.net source to execute above sp inside ssis

3. For destination I am using flat file to save the xml to respective location.

4. Everything works fine, accept for the tags that I define in staging table (xml column), they have xmlns="" as namespace inside them example <tag xmlns="">value</tag>

If all of this makes sence, please suggest a solution to this.

Thanks
Lokesh
Eirikur Eiriksson
Eirikur Eiriksson
SSCertifiable
SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)

Group: General Forum Members
Points: 6697 Visits: 17691
Quick questions,
1. Can you provide some sample data?
2. How are you querying the staging tables?
3. What is your SQL Server Version?
Cool
er.lokeshsharma08
er.lokeshsharma08
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 125
It turned out that xmlns does not have any impact on the processing of xml files. Xml files are being used by some other application and it didnt has any impact on the loading
er.lokeshsharma08
er.lokeshsharma08
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 125
Sample data is like we have hierarchy like jobs--blocks---dcv---items---clearing times
Jobs block are fixed tags with fixed number of elements. Howere items are coming from a table. Under items I we need clearing items whose tags come from config files.

So am storing clearing item data inside xml column of staging table

Version is sql 2012
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search