I have a class that defines a Key/Name value collection that i
generated by and XML Element with multiple attributes. The attribute
are used to create the collection of 'Binate' objects. This is writte
in VB.NET 1.1.
I have this class in a Win32 test application and it works fine. Whe
I put the class in a Web app I get the following error. The assembl
it is in is not directory in the ASP.NET application but in one tha
the ASP.NET application references.
Here is an example of the code that accepts an XML Text Stream t
create the collection of Binate objects.
Public Sub New(ByVal XMLString As String, _
Optional ByVal XMLElement As String = "data")
Dim _xmlDoc As New XmlDocument
Dim _xmlNode As XmlNode
Dim _xmlAttr As XmlAttribute
Dim lp As Integer
Binates = New Collection
If (XMLString Is Nothing) Then
Throw New Exception("XML Stream is not defined")
End If
XMLString = XMLString.Trim()
If (XMLString.Length = 0) Then
Throw New Exception("XML String must contain a vali
XML string")
End If
***************************
*** Error is thrown here
_xmlDoc.InnerXml = XMLString
***************************
_xmlNode = _xmlDoc.SelectSingleNode(XMLElement)
For lp = 0 To _xmlNode.Attributes.Count - 1
_xmlAttr = _xmlNode.Attributes(lp)
Dim _binate As New Binate
_binate.Key = _xmlAttr.Name
_binate.Value = _xmlAttr.Value
Binates.Add(_binate)
_binate = Nothing
Next
End Sub
Where noted the following exception is thrown:
This is an unexpected token. The expected token is 'NAME'. Line 1
position 40.
I only get this when in the Web application and I have moved this clas
to the web assembly, the business assembly and into two seperate tes
programs. It works in the Win32 but not in the Web.
Any ieas
--
SaCompGee
I have been a computer geek for over 20 years. Currently using .NE
Usinging C# and VB and SQLServ
-----------------------------------------------------------------------
SaCompGeek's Profile:
http://www.msusenet.com/member.php?userid=292
View this thread:
http://www.msusenet.com/t-187089491