Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Open XML in a Textbox

Posted on 2007-11-15
3
Medium Priority
?
400 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 2000 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 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

963 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