Jump to content

Newtoxml001

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Newtoxml001's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. 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>
  2. 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! Untitled.bmp
×
×
  • Create New...