Johnny Dubs
Member
- Joined
- Jan 17, 2009
- Messages
- 7
- Programming Experience
- Beginner
Hi there,
So I'm creating an application to parse particular documents (in this case e-mails) to XML. I have no problems parsing the computer generated tags in the e-mails (message id, to, from etc), but when it comes to the content of the e-mail I have problems.
I read the file in using the StreamReader function initially. I then read the file line by line. When it comes to reading the content of the e-mail I just use
in a loop, and I've tested outputting this to a text file, which reproduces the information with the same structure as the original e-mail.
But when I try and put this into the xml using:
(where content has been assigned the value of temp) it reproduces all of the information as one big group of words.
Since I need to analyse this content once it's in XML format it's important I maintain the structure...does anyone know how to?
Cheers!
So I'm creating an application to parse particular documents (in this case e-mails) to XML. I have no problems parsing the computer generated tags in the e-mails (message id, to, from etc), but when it comes to the content of the e-mail I have problems.
I read the file in using the StreamReader function initially. I then read the file line by line. When it comes to reading the content of the e-mail I just use
VB.NET:
sInputLine = FileReader.ReadLine()
temp &= sInputLine & vbCrLf
in a loop, and I've tested outputting this to a text file, which reproduces the information with the same structure as the original e-mail.
But when I try and put this into the xml using:
VB.NET:
Dim xml_content As XmlElement
xml_content = Doc.CreateElement("field")
xml_content.InnerText = "" & content & ""
(where content has been assigned the value of temp) it reproduces all of the information as one big group of words.
Since I need to analyse this content once it's in XML format it's important I maintain the structure...does anyone know how to?
Cheers!