Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7823667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:19:51+00:00 2026-06-02T08:19:51+00:00

I am writing data from a vb project to an XML document. When I

  • 0

I am writing data from a vb project to an XML document. When I recall the data, all the previous notes are coming back as one long line of text. How can I break the lines by submission to the XMl document?

Code:

Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles     btnSave.Click

        Dim AcctNum = txtAcctNum.Text.ToString

        'Dim note1 As String = ""

        'Dim linebreak As String = "<br />"

        'Str & VBNewLine
        'Str & VBCrLf

        Dim note2 As String = TxtNotes.Text
        'note2(0) = vbNewLine
        'note2(1) = TxtNotes.Text()

        Dim note3 As String = txtPastNote.Text

        note2 = note3 + "\n" + note2

        Dim root As XElement = XElement.Load("CreditApp.xml")

        Dim customer = From el In root.<custData>
                       Where el.<AcctNum>.Value = AcctNum
                       Select el

        For Each element In customer
            element.SetElementValue("Note", note2)
        Next

        'Dim NewNote As String = note1 + note2

        'Dim doc As New XmlDocument
        'doc.Load("CreditApp.xml")

        'Dim custData As XmlElement = doc.CreateElement("custData")

        'Dim note As XmlElement = doc.CreateElement("Note")
        'note.InnerText = NewNote

        'custData.AppendChild(note)
        'doc.DocumentElement.AppendChild(custData)

        root.Save("CreditApp.xml")
        MessageBox.Show("NOTES SAVE")

    End Sub

Code that retrieves the elements from XML:

 For Each element In customer
            txtSSN.Text = element.ssn
            txtfName.Text = element.fname
            txtlName.Text = element.lname
            txtAcctNum.Text = element.acctnum
            txtVerfiWord.Text = element.passcode
            txtAcctAmt.Text = element.acctAval
            txtAcctBal.Text = element.acctbal
            txtLPmtAmt.Text = element.lpmtamt
            txtLPmtDate.Text = element.lpmtdate
            txtGender.Text = element.gender
            txtAddress.Text = element.address
            txtCity.Text = element.city
            txtState.Text = element.state
            txtZip.Text = element.zip
            txtPhone.Text = element.phone
            txtEmail.Text = element.email
            txtCreditLmt.Text = element.creditlim
            txtIntRate.Text = element.intrate
            txtMinPmtDue.Text = element.minpay
            txtPmtDueDate.Text = element.pmtduedate
            txtPastNote.Text = element.note

end sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T08:19:54+00:00Added an answer on June 2, 2026 at 8:19 am

    I am presumming that you are using a TextBox, its Multiline property is set to True and the character you are using for the NewLine is part of the string being input from the xml file, You can try using String.Replace or if you need to split into seperate Strings you can use String.Split

    txtPastNote.Text = element.note.Replace("\n", vbCrLf) 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a program in Java where I read in data from an XML
I am writing a web based importer to import data from one database to
Is there any way of reading and writing the data from a Microsoft Project
I'm writing a plugin for Eclipse that collects some data from the project that's
Need help writing a script downloads data from google insight using c# this is
I am writing an exporting function to take data from a database table and
I'm writing a program that passes data from a file into an array, but
I'm writing a Perl script that reads data from the infamous /dev/input/event* and I
Is it possible to query data from a Model without writing sqarql-queries? Adding properties
I'm writing an application which reads data from a Microsoft Access database and writes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.