Groups | Blog | Home
all groups > dotnet xml > february 2007 >

dotnet xml : xs:element name in xsd file for int.



trialproduct2004 NO[at]SPAM yahoo.com
2/22/2007 11:06:03 PM
Hi all,

I am having table in database with say name as '1company'. when i
generate strongly typed dataset for this table in xsd file i am
getting entry as below:-

<xs:element name="_x0031_company" type="xs:string" minOccurs="0" />

Can anyone tell me why column name '1company' is written as
"_x0031_company"?

why can't i have entry as below:
<xs:element name="1company" type="xs:string" minOccurs="0" />

Any help will be truely appreciated.
Martin Honnen
2/23/2007 12:00:00 AM
[quoted text, click to view]

A name is not allowed to start with a digit, it has to start with what
the XML specification respectively the "Namespaces in XML 1.0"
specification specifies as an allowed character
<http://www.w3.org/TR/REC-xml/#NT-Name>
<http://www.w3.org/TR/REC-xml-names/#ns-qualnames>


--

Martin Honnen --- MVP XML
AddThis Social Bookmark Button