Newtoxml001
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Newtoxml001
-
-
I am creating an XML file using SQL server using FOR xml path(''), TYPE) to create the structure.
There is a section that combines single elements and repeating elements (details) within the same root. What I get is the single elements being repeated as many times for each repeating element. I need the output to look like the attached example. Is there a way to accomplish this?
Thanks!
XML name spaces in sql query
in XML
Posted
Hello,
I created a sql query in sql server that outputs an xml document. I have added namespaces to the beginning of the query WITH XMLNAMESPACES ('uri:' as ram, 'uri:' as rsm).
Is there a way that this wording does not appear within the structure? xmlns:rsm="uri:" xmlns:ram="uri:"
<rsm:ExchangedDocumentContext xmlns:rsm="uri:" xmlns:ram="uri:">
<ram:GuidelineSpecifiedDocumentContextParameter xmlns:rsm="uri:" xmlns:ram="uri:">
<ram:ID>urn:cen.eu:en16931:2017</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument xmlns:rsm="uri:" xmlns:ram="uri:">
<ram:ID>2019108789744</ram:ID>
<ram:TypeCode>380</ram:TypeCode>
<ram:IssueDateTime xmlns:rsm="uri:" xmlns:ram="uri:">
<ram:DateTimeString>20190307</ram:DateTimeString>
</ram:IssueDateTime>