Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Question from WHIZlabs

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following are not valid XML names?
Choose 3
1>xml_myElement
2>XMLElement
3>xml:myname
4>:12

answer:1,2,3
I don't think 4 is a valid xml name.
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure if you are right.

However xml name can be any name.
Why do you think :12 is not a valid xml?
Do not think it is weird and it's not a valid xml name.
It is not aways the case.

Did you do find your answer yet?

Here might be your answer:
An XML Name (sometimes called simply a Name ) is a token that
begins with a letter, underscore, or colon (but not other punctuation)
continues with letters, digits, hyphens, underscores, colons, or full stops [periods], known as name characters.

Names beginning with the string "xml", or any string which would match ((`X'|`x')(`M'|`m')(`L'|`l')), are reserved.

Element and attribute names must be valid XML Names. (Attribute values need not be.) An NMTOKEN (name token) is any mixture of name characters (letters, digits, hyphens, underscores, colons, and periods).
    Bookmark Topic Watch Topic
  • New Topic