Ok, sorry to be so needy this week! Here is the situation.
I have discovered how to do a linq query to get my data from my xml but when I return it as a string to a list box it is coming in as one large line. No breaks.
Here is the xml:
- <record>
<jurisdiction>VA Circuit</jurisdiction>
- <offender>
<fullname>VARDOS,BENSON</fullname>
<dob>01/01/1901</dob>
<ssn>123-45-1234</ssn>
<sex>MALE</sex>
<race>WHITE</race>
<haircolor />
<eyecolor>UNKNOWN</eyecolor>
<weight>000</weight>
<height>000</height>
<status />
<address>123 APPLE ST ,RICHMOND VA 23232</address>
<casenumber>112233</casenumber>
<comments>Offender#: 001 CASE#:112233</comments>
<statelinks />
<imagelinks />
<aliases count="0" />
</offender>
Here is the linq query:
ListBox1.Items.Clear()
Dim feedXML As XDocument = XDocument.Load("c:\mydata.xml")
Dim sb = New StringBuilder()
For Each s In (From nbdresponse In feedXML.Descendants("record") _
Where (nbdresponse.Element("jurisdiction").Value() = Me.DataGridView3.CurrentCell.Value) _
Select nbdresponse.Elements("offender").Value())
sb.Append(s)
Next
Dim foo = sb.ToString
ListBox1.Items.Add(foo)
and it is returning:
VARDOS,BENSON01/01/1901123-45-1234MALEWHITEUNKNOWN ..... ETC.
where as I need it to be
VARDOS, BENSON
01/01/1901
123-45-1234
MAIL
WHITE
UNKOWN
ETC.
i am also not apposed to putting this into a gridview as multi rows. But I am lost. Any advice? Any research directions i can take?