Solved

Open XML in a Textbox

Posted on 2007-11-15
3
383 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 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

10 Experts available now in Live!

Get 1:1 Help Now