?
Solved

Open XML in a Textbox

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

Python: Series & Data Frames With Pandas

Learn the basics of Python’s pandas library of series & data frames and how we can use these tools for data manipulation.

Question has a verified solution.

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

Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

719 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