Click here to Skip to main content
15,911,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
what is maximum count of attributes that are supported by xml?
Posted

No limit. How much RAM do you have?
 
Share this answer
 
v2
Comments
RhishikeshLathe 10-Oct-13 2:49am    
thanks sir for your answer
There is no such limit.So you can have any.But If you need to find the maximum number of attributes on a node in your xml doc,Then you can use something is as below.

XML
XElement el = XElement.Load("MyXML.xml");
int maxAttr = el.DescendantNodesAndSelf().OfType<XElement>().Max(x => x.Attributes().Count());


For more info :

Maximum number of attributes a node has in a XML document

I hope this will help to you.
 
Share this answer
 
v4
Comments
RhishikeshLathe 10-Oct-13 2:50am    
thank u so much, it is helpfull
Sampath Lokuge 10-Oct-13 2:53am    
If one of above answer sorted out your problem,you can accept one or more solutions as answer.So accepting the solution will help for the user who will have same problem in future.
There is no such limit in the XML specification: (http://www.w3.org/TR/REC-xml/)

Off Topic:
For a given XML Schema the number of ELEMENTS (not attributes of course = unique) can be specified by using maxOccurs. Did you mean something like this?
 
Share this answer
 

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