Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How can I set the output format of "FOR XML"?

How can I set the output format of "FOR XML"?

Scheduled Pinned Locked Moved Database
xmlquestiondatabasehelptutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Red_Wizard_Shot_The_Food
    wrote on last edited by
    #1

    At the moment I have a query that returns data about meetings in XML format using the "FOR XML AUTO, ELEMENTS" clause The problem is that if there is a meeting with the same person on the same day (I know, its hardly a common occurance) the XML output comes out like this: <mdate> <![CDATA[02/06/2006]]> </mdate> <Meetings> <id> <![CDATA[92]]> </id> <complete> <![CDATA[1]]> </complete> </Meetings> <Meetings> <id> <![CDATA[93]]> </id> <complete> <![CDATA[2]]> </complete> </Meetings> Unfortunatley because of the XSL file doing the formating it does not make table entries for the second meeting (id:93 in this example). What I want idealy is for the XML output to contain all the meeting information in seperate entries ... and NOT cluster together meetings with the same people one the same date like it is doing. Any ideas? or should i make a different XSL file to handle this out put? (and if so any hints on doing that as I mostly just loop through output in a very simple manner) Thanks

    T 1 Reply Last reply
    0
    • R Red_Wizard_Shot_The_Food

      At the moment I have a query that returns data about meetings in XML format using the "FOR XML AUTO, ELEMENTS" clause The problem is that if there is a meeting with the same person on the same day (I know, its hardly a common occurance) the XML output comes out like this: <mdate> <![CDATA[02/06/2006]]> </mdate> <Meetings> <id> <![CDATA[92]]> </id> <complete> <![CDATA[1]]> </complete> </Meetings> <Meetings> <id> <![CDATA[93]]> </id> <complete> <![CDATA[2]]> </complete> </Meetings> Unfortunatley because of the XSL file doing the formating it does not make table entries for the second meeting (id:93 in this example). What I want idealy is for the XML output to contain all the meeting information in seperate entries ... and NOT cluster together meetings with the same people one the same date like it is doing. Any ideas? or should i make a different XSL file to handle this out put? (and if so any hints on doing that as I mostly just loop through output in a very simple manner) Thanks

      T Offline
      T Offline
      Tushar Kothari
      wrote on last edited by
      #2

      Hi If you are using .Net then you can create XSD file for that and then you can store the output in dataset created by XSD. Regards

      Tushar kothari

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups