Solved

Open XML in a Textbox

Posted on 2007-11-15
3
394 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

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…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

752 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