Encountering Error: This is an unexpected token. The expected token is 'NAME'.

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

0
7/14/2005 12:58:33 PM
dotnet.xml 7266 articles. 0 followers. Follow

2 Replies
475 Views

Similar Articles

[PageSpeed] 14

Oleg, thanks for the reply.

You are correct in that it was malformed but there is no line 40 whic
threw me off.  Here is the XML that I thought I was testing:

<?xml version="1.0" encoding="us-ascii"?>
<data isAGoodDay="Yes" badDayTomorrow="Yes" chanceOfRain="70
suggestions="" />

but here is what was really being used:

<?xml version="1.0" encoding="us-ascii"?>
<dat
isAGoodDay="Yes"badDayTomorrow="Yes"chanceOfRain="70"suggestions="" />

No spaces betweem the attributes made it barf.
Thanks again,  Shaw

--
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

0
7/14/2005 4:11:33 PM
SaCompGeek wrote:

> Where noted the following exception is thrown:
> This is an unexpected token. The expected token is 'NAME'. Line 1,
> position 40. 

Looks like your XML is malformed. Why don't you see what is at position 
40 in line 1?

-- 
Oleg Tkachenko [XML MVP, MCAD]
http://www.xmllab.net
http://blog.tkachenko.com
0
Oleg
7/14/2005 4:34:04 PM
Reply:

Similar Artilces:

Automatically naming a file using cell contents
How do I use the contents of a cell to automatically name a file using a macro to populate Save As? Include this in your macro: Activeworkbook.SaveAs Filenmae:=Range("A1").Value & ".xls" tj "Rob" wrote: > How do I use the contents of a cell to automatically name a file using a > macro to populate Save As? ...

Send/Receive--Error Nos Ox800cccOd and Ox800cccOf
I've been having problems recently sending and receiving email on Outlook 2000. I get a "server cannot be found" message with the error number Ox800cccOd and a "tcp/ip connection was unexpectedly terminated by the server" message with the error number Ox800cccOf. An earlier poster identified the same problem and was able to fix it by closing down Outlook and then opening it again. This, however, has not worked for me. Does anyone have any other suggestions as to how I might fix this problem? ...

Budgetting problem encountered
I am having a problem with the budgeting function of Money 2002. After entering my expense categories, I proceed to the next screen entitled: "Review your current budget status." The software has added an additional budget category entitled: "Special" with a subcategory entitled "debt." It has added an amount for this category that I had not entered in my budget. There is no telling where it got this figure, nor why it should have added something to my budget that I do not want added. Moreover, I cannot delete this budget category. The only way to ...

Error posting batch
I just upgraded to version 8.0 from 7.5 and everytime I post a batch I get this error The stored procedure glpBatchCleanup returne the following results: DBMS 0, Great Plains 20488. When I click the More Info button I see thsi Select on Batch_headers failed. Can somebody point me out on how to fix this. thanks Have you applied any 8.0 service packs? "Mathieu Momy" <mmomy@seapr.ca> wrote in message news:%23EOwUUCyFHA.596@TK2MSFTNGP12.phx.gbl... >I just upgraded to version 8.0 from 7.5 and everytime I post a batch I get >this error The stored procedure glpBatc...

Error Message #29
I am using Outlook 2003 on Windows XP. I cannot send or receive email. The error message is: Task "Hotmail: Folder:Inbox Synchronizing headers. 'reported error (0x800CCCF4): "An unknown error has occurred. Please save any existing work and restart the program." ...

Word has encountered a problem
I get this message the first time I open a file in Word after Windows startup using File/Open. If I restart Word it works OK and I don't see the error again during that computer session. The error does not occur if I open a file in Word using Recent Documents or by double clicking on a file in Explorer. It only occurs on the first File/Open I have tried the following: - resetting the normal.dotm file - turning of Microsoft Security Essentials - running winword.exe as Administrator Any suggestions? The text of the error message is as follows - interesting that it sa...

Dsum returns #Error
Hi. I created a report based on a query that uses Dsum function. This query runs well in the server where I created it. But when I ran it in a different PC, it gave me #error on the query result on the field that uses DSum. I compared reference files used on both server and the PC and they were the same. Is there any specific dll I need to add to the PC to make it work? I have to modify it to sum(iif()) to make it work now. Thanks. lwidjaya wrote: >I created a report based on a query that uses Dsum function. This query runs >well in the server where I created it. But w...

Error on creating new attribute
Hi all: I am trying to simply create a new attribute in MSCRM using the tools provided in the app (Settings->Customization->Customize Entities->Account), and it fails with the oh-so-helpful message "An error has occurred, contact your system administrator". I checked the windows event logs, nothing. I also tried to enable debug tracing in MSCRM but that didn't tell me much either. Has anyone seen this before and know how to fix it? I tried creating attributes for several different entities, different types, different names, etc. but no joy. Thanks in advance fo...

Project error
In the Progress Billing entry screen I am getting this error: "Error has been detected in retention fee and/or recievables account : changes can not be made" How do i fix this? Michael ...

Sending error #4
I'm getting a sending reported error 0x800ccc69 The tricky thing is that there is nothing in my outbox. What is it trying to send? Make sure your are running the latest virus protection and spyware removal program. >-----Original Message----- >I'm getting a sending reported error 0x800ccc69 > >The tricky thing is that there is nothing in my outbox. >What is it trying to send? >. > ...

Error Messages #2
Hi I hope you can help... I am using vlookup functions and as we know if it can't find a value i returns a cell value of #N/A. However the result of the lookup is used to calculate another part o the worksheet. So if there is an error #N/A I want it to appear in th spreadsheet either as a blank cell or as a value of 0. Is this possible -- Message posted from http://www.ExcelForum.com Hi try =IF(ISNA(VLOOKUP(....),0,VLOOKUP(...)) HTH Frank > Hi I hope you can help... > > I am using vlookup functions and as we know if it can't find a value > it returns a cell value...

Report Services Error on Client -- but reports work on the server
When I try to run reports on a client a get reporting error. But when I am on Remote Desktop to the CRM server, all reports work. Reporting Services Error -------------------------------------------------------------------------------- An error has occurred during report processing. (rsProcessingAborted) Get Online Help Cannot create a connection to data source 'CRM'. (rsErrorOpeningConnection) Get Online Help Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. Note: SQL Report Services is installed on a different server than SQL...

Serialize error
I have a CTypedPtrArray m_ListNames. I input names and with serialize I save those names to disk. It all works fine until I try to save my document after I have either deleted one of the objects in mListNames or I delete and object in m_ListNames and I then SetAt(same_index) a new object in m_ListNames. I have put breakpoints in the program and found that I get an error at run time when it reaches serialize objects of m_ListNames. Is there code that I am forgetting to add or is there an error in the way that I am deleting objects of m_ListNames? Thanks Al -- Just Al Just code error. ...

Error opening email.
After installing office 2003, everything was great, untill I had to close and re-open outlook. now, everytime I try to open an email, it says something to effect of that there is not enough memory, close someother programs and try again. This is after a fresh reboot, no programs running, and 1 gig of memory on the box...Please advise! ...

Index/Match ... Excel has encountered an Error
Excel2003 WorkBook with many INDEX/MATCH Formulas ... Issue ... When I attempt to write a new INDEX/MATCH Formula I am having a problem with Excel each time I attempt to enter the "M": =Index(myrange,m ... at this point I receive pop-up stating I have an "Identify" conflict & I need to select a Cell to use ... Seems no matter what I do at this point I receive the Error message "Excel has encountered a problem & needs close". Above said, my work around has been to copy/paste an INDEX/MATCH formula from a different cell & then to edit ...

Incremental number error
[This is a re-post. Accidentally sent to wrong group] My form creates an incremental number for a job sheet when a tick box is checked and this is stored in the underlying table. Code: Private Sub Form_BeforeUpdate(Cancel As Integer) If Me.[JobSheetCheck] = True Then Me.[JobSheetNumber] = Nz(DMax("[JobSheetNumber]", "[Events]"), 49999) + 1 End If End Sub The JobSheetNumber field is locked and, once ticked, the tick box is locked so that neither can be deleted. The problem I have is that if any changes are made to any other field on the form, when you re-ent...

Error message #15
When I leave Money it states "The exception Floating- point overflow occured in the application @ location". Any idea what this means. Is it a problem I should be dealing with? In microsoft.public.money, donna wrote: >When I leave Money it states "The exception Floating- >point overflow occured in the application @ location". > >Any idea what this means. Is it a problem I should be >dealing with? What program are you using? ...

Change name direction
How do I change the name John Smith to *Smith, John* -- Message posted from http://www.ExcelForum.com Hi have a look at http://www.cpearson.com/excel/FirstLast.htm Frank One way: ="*"&MID(A1,FIND(" ",A1)+1,255)&", "&LEFT(A1,FIND(" ",A1)- 1)&"*" HTH Jason Atlanta, GA >-----Original Message----- >How do I change the name John Smith to *Smith, John* ? > > >--- >Message posted from http://www.ExcelForum.com/ > >. > ...

How can I generate a user friendly error message when validating XML against a schema?
Hello When validating xml against a schema, the most frequent error I get is something like "The 'FOO' attribute has an invalid value according to its data type. An error occurred at , (25, 913)". That error message is not very user friendly, so I'd like to extract the data in the failing node along with its parent node data, and show that to the user. Do you know a way to do this? I don't think there's any other information about the error position than the line number and position. Yes, line number and position is the only information that you have to...

Subsystem Spooler has encountered problems
The last couple of days my Outlook has been completely frozen - nothing gets in and nothing goes out, and it's impossible to close it down (see Colin's email about having to use taskmanager to close it) - when I open it up, the above error message appears: "Windows Messaging Subsystem Spooler has encountered a problem and needs to close." Please someone help!! ...

Outlook 2000 Error Message #4
When I attempt to open my inbox I get the following error message. Unable to expand the folder. The set of folders could not be opened. The Exchange Server has detected that you are using an old copy of your OST file. Please delete your OST file and create a new one from the server. Do a search on your C:\ drive for *.ost, rename outlook.ost to outlook.001. When you open Outlook, a new *.ost file will be created. >-----Original Message----- >When I attempt to open my inbox I get the following error >message. >Unable to expand the folder. The set of folders could not >...

Blank Distribution Accounts
Hi! Was wondering if any of you came across this problem in GP. Have a client who was able to post transactions from AP with NO account distributions. The system did not give them any errors in the subledger. When they tried to post the batches in GL, that's when they received errors about the missing distribution accounts. When they drill back on the AP transactions, the amounts are there but the accounts are all blank. Any ideas? The client is on GP 7.5. Thanks Marisol ...

Reserved error (-1524); there is no message for this error.
I am trying to run a pretty simple select query in Access 2007, and I keep getting the error message "Reserved error (-1524); there is no message for this error." There are no linked tables in the database - the design of the database is very simple. I should also note that I ran the "compact and repair database" tool and I am still getting the same error message. I don't think I'm using any reserved words...Here is the SQL: SELECT E_CURRENT_DATA.Prefix, E_CURRENT_DATA.LastName, E_CURRENT_DATA.FirstName, E_CURRENT_DATA.Address, E_CURRENT_DATA.City, E_CURRENT_DATA...

Sa Login Error
Dear All, Recently on our test machine the password for sa was rest in the db. Now when I am trying to connect to my CRM application it is giving me an error, which in event viewer is : --------------------- Event Type: Error Event Source: RLSERVICE Event Category: None Event ID: 0 Date: 6/22/2008 Time: 11:47:46 AM User: N/A Computer: SERVER02 Description: Start: Login failed for user 'sa'. ----------- How can this be resolved? ...

sent items doesn't show name of addressee, just sender
Outlook 2007 Under my hotmail account in Sent Items the addressee name always shows my name, not the person to whom the email was sent. What's wrong? -- Dick from NJ Dick wrote: > Outlook 2007 > Under my hotmail account in Sent Items the addressee name always shows my > name, not the person to whom the email was sent. What's wrong? There is no Addressee field. There are From and To fields depending on what fields you choose to display (depends on which view you choose or how you have customized it). In OL2003 to customize the view, right-click on t...