Solved

suppressing namespace declarations in subqueries when using for xml

Posted on 2010-09-23
5
516 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

756 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