Which of the following strings is a correct XML name?

Options
- _myElement
- my Element
- #myElement
- None of the above


CORRECT ANSWER : _myElement

Discussion Board
_myElement

-In XML, element names are case sensitive.
-Must begin with letter or underscore(_).
-After initial character following are allowed:
digits
period(.)
hyphen(-)
underscore(_)
colon(:)
-Should be used except Name-spaces(provide a method to avoid element name conflicts).
-NO other characters are allowed like #, @, $, %
-Element names cannot begin with xml, Xml, XMl, XmL, xML, xMl

Sapna 02-20-2017 02:00 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement