Question

  Asked: May 21 2007   7:42 PM GMT
  Asked by: rbeethe


Turning Report Output into XML


XML, WebServices, Web Services Standards

We have a report subroutine that most all programs PERFORM to write data to our electronic report distribution system. Looking for suggestions on how to define these reports so we can store them in some form of XML that would then maybe be applied against a style sheet perhaps? I'm still a novice when it comes to XML, XSLt, etc.

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



Here's a method that should work for XML and HTML. The concept is that you want to wrap your values in tags, wrap lines of those in tags, and wrap tables of those in tags. In the example below, underlines are really spaces, but used to keep this page's formatter in line.

So, if the current output looks like this:

Numbers__Fruits__Vegetables
______1__Orange__Tomato
______2__Apple___Brussel_sprouts
______3__Banana__Potato

Then we can use HTML or XML to wrap things, using TD for table data, TR for table row, and TABLE for table: (One further item: The formatter won't allow me to show you real HTML. So, in the example below, [ means the Less-Than symbol, and ] means the Greater-Than symbol)

[TABLE]
[TR][TD>Numbers[/TD>][TD]Fruits]/TD][TD]Vegetables[/TD][/TR]
[TR][TD]1[/TD][TD]Orange[/TD][TD]Tomato[/TD][/TR]
[TR][TD]2[/TD][TD]Apple[/TD][TD]Brussel_sprouts[/TD][/TR]
[TR][TD]3[/TD][TD]Banana[/TD][TD]Potato[/TD][/TR]
[/TABLE]

---
Sheldon Linker (sol@linker.com)
Linker Systems, Inc. (www.linkersystems.com)
800-315-1174 (+1-949-552-1904)
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Development.

Looking for relevant Development Whitepapers? Visit the SearchSQLServer.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register