Connecting Tech Pros Worldwide Forums | Help | Site Map

Unable to convert input xml file content to a DataSet/Invalid 'name' attribute value

mahet's Avatar
Newbie
 
Join Date: Feb 2007
Location: Rio de Janeiro
Posts: 4
#1: Apr 5 '07
Anders Jansson was a guest here, and he was having problem:

When I try to build the web, this error is displayed:
--->
Error 5 Unable to convert input xml file content to a DataSet.
Invalid 'name' attribute value 'Företag': 'The '¶' character, hexadecimal
value 0xB6, at position 2 within the name, cannot be included in a name.'.
<start path>My
Webs\ProAra\wwwroot\App_Code\kappsegling\ProAra.Ka ppSegling.rorsmandataset.xsd
-->

This applies to all Dataset definitiion files with Swedish characters used
to specifiy elements in a database table. The problem seems to be that the
xsd file can't handle Swedish characters as åäö. Locale is set to
Swedish(Swedish).

Well, I also had this problem! In my case, my tables in SQL Server are named in portuguese. Since I compiled my solution, Visual Studio 2005 was not able to understand the XSD, and showed me this error:

Unable to convert input xml file content to a DataSet. The 'blablabla' character, hexadecimal...blablabla.

I finally figured out a solution.

1 - I viewed the source code of the .XSD in the folder App_code
2 - I changed the first line of the xml within the source code:

it was:
<?xml version="1.0" encoding="utf-8"?>

and I changed to:
<?xml version="1.0" encoding="iso-8859-15"?>

Now everything were compiled just fine. No errors! :-)
If you are having problems to compile your web solution and you have table names in your own country language, try to change the xml encoding atribute within the XSD file.

Does anybody have a better work around?

kenobewan's Avatar
Moderator
 
Join Date: Dec 2006
Posts: 4,745
#2: Apr 6 '07

re: Unable to convert input xml file content to a DataSet/Invalid 'name' attribute value


Thanks for sharing the solution. You may need to look at more localization articles to find a better solution :).
Reply


Similar .NET Framework bytes