Solved

Open XML in a Textbox

Posted on 2007-11-15
3
389 Views
Last Modified: 2013-11-26
Hi,

I have a winforms application that I want to add a Rich Textbox to. I am new to XML and hope the following is possible. Can I open a XML file in a Textbox (Rich TextBox) after I formatted the XML with my XSL file? If I make changes to that opened file can I update the XML file? How?

Let me know if you need more information.

Thanks
0
Comment
Question by:ALawrence007
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
ericwong27 earned 500 total points
ID: 20295241
Hopefully this help.
Public Class Form1
 

    Private Sub Open_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Open_Button.Click
 

        Me.RichTextBox1.Text = My.Computer.FileSystem.ReadAllText("C:\TEMP\note.xml")
 

    End Sub
 

    Private Sub Save_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save_Button.Click

        My.Computer.FileSystem.WriteAllText("C:\TEMP\note.xml", Me.RichTextBox1.Text, False)

    End Sub
 

End Class

Open in new window

0
 

Author Comment

by:ALawrence007
ID: 20298571
Eric,

This helped a lot! thank you. One more question: Is it possible to format the XML with my XSL file and then Display the formatted XML in the RichTextbox?

Thanks
0
 
LVL 10

Assisted Solution

by:ericwong27
ericwong27 earned 500 total points
ID: 20306202
Is the following help? If not you may need to post another question with more detail so everyone able to assist your problem.

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/XSLT/Q_22742453.html
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now