XML Multiple choices


Total available count: 49
Subject - Web Development
Subsubject - XML

Which is not the correct name for an XML element?


 

 

 

 



C


Solution:-

XML elements must follow these naming rules: Element names are case-sensitive. Element names must start with a letter or underscore.

<1Slightbook> is not an XML element. An XML element can contain several things such as text, attributes, and a mix of both elements. On the other part, an XML element without any content called empty XML elements.

Syntax
Following is the syntax to write an XML element −

<element-name attribute1 attribute2>
....content
</element-name>

Following is an example of an XML document using various XML element −

<?xml version = "1.0"?>
<contact-info>
<address category = "slightbook">
 <name>Slight Book</name>
 <company>Slight Book Dot Com</company>
 <phone>(011) 123-4567</phone>
</address>
</contact-info>

 




Next 5 multiple choice(s)

1

XML elements cannot be empty

2

Is this a "well formed" XML document?
<?xml version="1.0"?>
<note>
<to age=33>Shyam</to>
<from>Krishna</from>
</note>

3

Is this a "well formed" XML document?
<?xml version="1.0"?>
<note>
<to age="33">Krishna</to>
<from>Nellore</from>
</note>

4

XML preserves white spaces

5

 Which statement is true?

Comments