Solved

suppressing namespace declarations in subqueries when using for xml

Posted on 2010-09-23
5
514 Views
Last Modified: 2012-08-13
Hello,
I 've created a sqlserver stored procedure to generate an xml file.  I use " with xmlnamespaces"  and have multiple nested "select for xml " statements.   When the xml file is created, the namespace shows up for each nested query.  What can I do in the stored procedure to eliminate the namespace in the subquery elements?

Thank you,

0
Comment
Question by:SAZ2
  • 3
  • 2
5 Comments
 
LVL 5

Expert Comment

by:rajaamirapu
ID: 33750749
After getting the namespace nodes, you could remove the namespace from the xml
Exectue the stored procedure
see this link,
it has everthing about namespace
0
 

Author Comment

by:SAZ2
ID: 33754072
Thank you for the response.  Will you please post the link?  Thanks
0
 
LVL 5

Accepted Solution

by:
rajaamirapu earned 500 total points
ID: 33756045
0
 

Author Comment

by:SAZ2
ID: 33863924
Thank you all for the response.  I have gotten it to with the namespaces.  Thank you
0
 

Author Closing Comment

by:SAZ2
ID: 33863948
Not sure how to grade.  The program worked with all the imbedded namespaces, I thought it would not so I was trying to get rid of them.   I appreciate the feedback none the less.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question