Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm developing an application in which I save data in a xml file.
XML
<TreeViewData>
<Nodes>
<TreeNodeData>
<Text>Breakfast</Text>
<ImageIndex>-1</ImageIndex>
<SelectedImageIndex>-1</SelectedImageIndex>
<Checked>false</Checked>
<Expanded>false</Expanded><
Tag xsi:type="xsd:string">
- One Egg  n' Bacon or Sausage.
- Two Eggs  n' Biscuits.
- Muffin n'Fruit.
</Tag>
</TreeNodeData>
<TreeNodeData>
<Text>Lunch</Text>
<ImageIndex>-1</ImageIndex>
<SelectedImageIndex>-1</SelectedImageIndex>
<Checked>false</Checked>
<Expanded>false</Expanded>
<Tag xsi:type="xsd:string">
- Baked Chicken n' Dressing.
- Meatloaf and Mashed Potatoes.
- Turkey n’ Dressing.
</Tag>
</TreeNodeData>
<TreeNodeData>
<Text>Dinner</Text>
<ImageIndex>-1</ImageIndex>
<SelectedImageIndex>-1</SelectedImageIndex>
<Checked>false</Checked>
<Expanded>false</Expanded>
<Tag xsi:type="xsd:string">
- Butter-Baked Chicken.
- Broccoli Cheddar Chicken.
- Fried Pork Chops.
</Tag>
</TreeNodeData>
</Nodes>
</TreeViewData>


Now I need a way to show this data in a readable format like html or pdf. I tried to study XSLT Transformations on http://msdn.microsoft.com/en-us/library/14689742.aspx and http://www.w3schools.com but I couldn't get much help out of it. So I was wondering if any one can provide me with any help. Thanks in advance
Posted
Updated 4-May-13 14:14pm
v3
Comments
Sergey Alexandrovich Kryukov 4-May-13 23:58pm    
Not clear what help do you expect. What to use XSLT? You can use it for HTML, but hardly with PDF. What's the problem? Use it if you want.
—SA
al3abby 5-May-13 10:03am    
First, thanks for your comment. I need to understand how to convert a xml file to a html file for example. So I was hopping someone could provide me with a link to a tutorial or an article that describes the process in a friendly way
Sergey Alexandrovich Kryukov 5-May-13 14:11pm    
This is what XSLT is used for in most situations. Any non-nonsense reading about XSLT will teach your the techniques you need.
—SA

1 solution

This should tutorial even starts with the XML to HTML problem: http://www.tizag.com/xmlTutorial/xslttutorial.php[^].

You can exercise with XSLT editor: http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog[^].

See also: http://en.wikipedia.org/wiki/XSLT[^].

Pay attention for the documentation and tutorial referenced at the end of this article.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900