EDN Admin
Well-known member
public: void printXML()<br/>
<span style="white-space
re {<br/>
<span style="white-space
re array<RichTextBox^> ^ textboxes = gcnew array<RichTextBox^> { richTextBox1, richTextBox2, richTextBox3, richTextBox4, richTextBox5, richTextBox6, richTextBox7, richTextBox8, richTextBox9, richTextBox10, richTextBox11,
richTextBox12};<br/>
<span style="white-space
re SaveFileDialog^ saveFile1 = gcnew SaveFileDialog;<br/>
<span style="white-space
re saveFile1->DefaultExt = "*.rtf";<br/>
<span style="white-space
re saveFile1->Filter = "RTF Files|*.rtf";<br/>
<span style="white-space
re if ( saveFile1->ShowDialog() == System::Windows::Forms:
ialogResult::OK && saveFile1->FileName->Length > 0 )<br/>
<span style="white-space
re {<br/>
<span style="white-space
re for each( auto textbox in textboxes )<br/>
<span style="white-space
re {<br/>
<span style="white-space
re //File::AppendAllText(saveFile1->FileName, textbox->Text );<br/>
<span style="white-space
re WriteStartDocument(saveFile1->FileName);<br/>
<span style="white-space
re WriteStartElement("Name");<br/>
<span style="white-space
re WriteString(textbox->Text);<br/>
<span style="white-space
re WriteEndElement();<br/>
<span style="white-space
re File::AppendAllText(saveFile1->FileName, Environment::NewLine);<br/>
<span style="white-space
re }<br/>
<span style="white-space
re }<br/>
<span style="white-space
re }
I am trying to make my object output in xml format. I initiate the object textbox but that holds my string data to be inserted. Do I have to create a second object or is the a cleaner way like File:: is to File::AppendAllText to call on the class declarations?
textboxObject -> convert to XML -> write to file -> write newline -> loop
View the full article
<span style="white-space

<span style="white-space

richTextBox12};<br/>
<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space


<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

<span style="white-space

I am trying to make my object output in xml format. I initiate the object textbox but that holds my string data to be inserted. Do I have to create a second object or is the a cleaner way like File:: is to File::AppendAllText to call on the class declarations?
textboxObject -> convert to XML -> write to file -> write newline -> loop
View the full article