can we use a number as text node in XML file? for example
<2>
<abi>Zen</abi>
</2>
it is giving the error as follows
can we use a number as text node in XML file? for example
<2>
<abi>Zen</abi>
</2>
it is giving the error as follows
XML elements must follow these naming rules:
* Names can contain letters, numbers, and other characters
* Names cannot start with a number or punctuation character
* Names cannot start with the letters xml (or XML, or Xml, etc)
* Names cannot contain spaces
Short answer: No.
You could use something like this, though
<element2>
<abi>Zen</abi>
</element2>
But this would make for a really ugly XML schema, where you would ultimately be limited to a maximum number of elements.
I think you should go with somethink like this:
<element number="2">
<abi>Zen</abi>
</element>