Click here to Skip to main content
15,912,400 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Why xml does not allow spaces between attribute name?
I have following which DOES not works
<custormer information logs>
<..Some data >
</custormer information logs>

Following works
<custormerinformationlogs> // Here I removed white space
<Some data>
</custormerinformationlogs>
Posted
Updated 8-Sep-10 0:36am
v2
Comments
Kubajzz 8-Sep-10 7:15am    
Your question is the same like "Why do XML tags start and end with '<' and '>' instead of '{' and '}'" or "Why is C# case-sensitive"...

It's because it was designed that way. You may not like it, but that's all you can do about it.

1 solution

Strictly speaking <custormerinformationlogs> is an element name which can contain attributes e.g.
<custormerinformationlogs attrib1=val1 attrib2=val2>

notice that the attributes are separated with spaces, if element names where allowed spaces this would make parsing more complex
 
Share this answer
 
Comments
pandit84 8-Sep-10 7:46am    
Reason for my vote of 3
nice wording
pandit84 8-Sep-10 7:47am    
Thanks a lot ...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900