Sams Teach Yourself XML in 21 Days

Sams Teach Yourself XML in 21 Days

By Steven Holzner

Workshop

This workshop tests whether you understand the concepts you saw today. It's a good idea to make sure you can answer these questions before pressing on to tomorrow's work.

Quiz

  1. To be well-formed, what's the least number of elements an XML document can contain?
  2. Why is the following XML document not well-formed?
    <?xml version = "1.0" standalone="yes"?>
    <employee>
        <name>Frank</name>
        <position>Chef</position>
    </employee>
    <employee>
        <name>Ronnie</name>
        <position>Chef</position>
    </employee>
    
  3. Why is the following XML document not well-formed?
    <?xml version = "1.0" standalone="yes"?>
    <employee>
        <kitchen_staff/>
        <name language=en>Frank</name>
        <new_hire />
        <position language=en>Chef</position>
    </employee>
    
  4. How can you create a namespace named service whose URI is http://www.superduperbigco.com/customer_service?
  5. How could you set the default namespace in a set of XML elements to the URI http://www.superduperbigco.com/customer_returns?

Share ThisShare This

Informit Network