Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / January 2006

Tip: Looking for answers? Try searching our database.

XML to RTF parsing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ilya Dyoshin - 25 Jan 2006 13:49 GMT
Hi all

There is an XML file, formed from dataset.

I want to see this in the RTF-document like a set of tables.
something like:

Table1 name
+------------------------+------------------------+--------------------+
| Table1.Column1 name    | Table1.Column 2 name   | Table1.Column3 name|
+------------------------+------------------------+--------------------+
|Column1.Row1 data       | column2.row1 data      | column3.Row1 data  |
+------------------------+------------------------+--------------------+
|Column1.Row2 data       | column2.row2 data      | column3.Row2 data  |
+------------------------+------------------------+--------------------+

Table2 name
+------------------------+------------------------+
| Table2.Column1 name    | Table2.Column 2 name   |
+------------------------+------------------------+
|Column1.Row1 data       | column2.row1 data      |
+------------------------+------------------------+
|Column1.Row2 data       | column2.row2 data      |
+------------------------+------------------------+

and so on.

Can someone give me code samples how to do it?

Thanks all!
Miha Markic [MVP C#] - 25 Jan 2006 14:15 GMT
Hi Ilya,

You might consider using XSLT to generate RTF.
Sorry, no samples...

Signature

Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

> Hi all
>
[quoted text clipped - 26 lines]
>
> Thanks all!
W.G. Ryan eMVP - 28 Jan 2006 05:48 GMT
> Hi all
>
[quoted text clipped - 26 lines]
>
> Thanks all!
--Ilya - like Miha mentions, you would probably want to use XSLT b/c it will
support this translation.  XSLT is  one of those skills IMHO that has a
little bit of a learning curve up front (like Regular Expressions)  but it
pays for itself in droves in the future. Suffice to say that you can parse
stuff a zillion ways, you can take those parsed tokens and use a RTF writer
class to write the RTF, you can do a lot of things. But if you take a few
steps back and focus on XSLT, you'll have a clean elegant solution + you'll
have a skill that you Will be glad you picked up , in the near future  This
should help get you started:

http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_2134
6463.html


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.