Hi All,
Ok, this must be a simple one, I'm trying to read a certain elements
contents from an XML file. Heres what I've come up with so far, which
seems
to get stuick in a loop (ASPNET.EXE hogs the CPU until I kill it!)
Public Function GetPageName(ByVal XMLFileName As String) As String
Dim XmlReader As New
XmlTextReader(Session("DataLocation").ToString
& XMLFileName)
XmlReader.Read()
While Not XmlReader.EOF
If XmlReader.Name = "Title" Then
Return XmlReader.ReadString()
End If
End While
'Return XmlReader.ReadElementString("Title")
XmlReader.Close()
End Function
Note that session("datalocation") is a full path.
Thanks,
Simon.
--
I am using the free version of SPAMfighter for private users.
It has removed 2168 spam emails to date.
Paying users do not have this message in their emails.
Try www.SPAMfighter.com for free now!