suppressing namespace declarations in subqueries when using for xml

Posted on 2010-09-23
Medium Priority
Last Modified: 2012-08-13
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,

Question by:SAZ2
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Expert Comment

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

Author Comment

ID: 33754072
Thank you for the response.  Will you please post the link?  Thanks

Accepted Solution

rajaamirapu earned 2000 total points
ID: 33756045

Author Comment

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

Author Closing Comment

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.

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

800 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