Hi,
I am involved in making an interface for a bluetooth project, I have to extract the data from a XML file by parsing it and put it in a list view control. I am successful in extracting the data, but I find some unwanted characters before and after the actual data, I have to display.
The point to be noted is that when I display the same on a form/panel using DrawString(), I find the data without any unwanted characters. The problem is arising only when I display it in a ListView control. I am pasting the code I have written, Can anyone suggest me the way by which I can eliminate the unwanted characters and display the actual data... All suggestions are welcome...


Prashanth


CODE (IN VB.Net):
In Button_Click()



Dim g As Graphics = CreateGraphics()
Dim f As Font = DefaultFont()
Dim b As Brush = New SolidBrush(Color.Blue)

Dim document As XmlDocument = New XmlDocument()
document.Load("XMLFile1.xml")

Dim reader As XmlNodeReader = New XmlNodeReader(document)



While reader.Read
Select Case reader.NodeType

Case XmlNodeType.Element

Select Case reader.Name
Case "Inside"
reader.Read()
ListView2.Items.Add(CStr(reader.Value), 0)
ListView2.Height = ListView2.Height + ListView2.Font.Height * 6 / 4
End Select

End Select
End While