Question

In: Computer Science

Please Write an XML document describing a person: name, occupation, address, and hobbies. Decide on suitable...

Please

Write an XML document describing a person: name, occupation, address, and hobbies. Decide on suitable element names and nesting. Check your document for well-formedness. And draw a tree that represents the XML document you created.

Thanks

Solutions

Expert Solution

<?xml version="1.0" encoding="UTF-8"?>
<person>
        <name>
                <first_name>Alan</first_name>
                <last_name>wilson</last_name>
        </name>
        <occupation>assistant professor</occupation>
        <address>
                <street>2552 Raintree Boulevard</street>
                <city>Indianapolis</city>
                <post_code>z-46225</post_code>
                <state>Indiana</state>
        </address>
        <hobbies>
                <hobby1>cooking</hobby1>
                <hobby2>reading</hobby2>
                <hobby3>singing</hobby3>
        </hobbies>
</person>

The following tree is created with the help of SmartArt graphics in MS-Word.


Related Solutions

Exercise 2: Write an XML document describing a person: name, occupation, address and hobbies. Please do...
Exercise 2: Write an XML document describing a person: name, occupation, address and hobbies. Please do not use your own information, you can use fake data. Decide on suitable element names and nesting. Check your document for well-formedness. Exercise 3: Draw a tree that represents the XML document you created in task 2.
Exercise 1: Write an XML document describing the exercises in this document: the root element is...
Exercise 1: Write an XML document describing the exercises in this document: the root element is <exercises>. The root has an attribute number that has value 1. The root element has three child elements; <date> that contains as text the date of the exercise, and two <item> elements for the first two exercises (1--2). Write some text in the <item> elements. Exercise 2: Write an XML document describing a person: name, occupation, address and hobbies. Please do not use your...
Write a DTD for this XML document such that the corrected version of the example is...
Write a DTD for this XML document such that the corrected version of the example is a valid XML document <?xml version="1.0"?> <computers> <item type = "Laptop" code = "Dell437">    <make>    <brand>Dell Inspiration</Brand>    <supplier id = "Dell"/>    </make>    <spec>    <cpu speed = "900"/>    <harddisk size = "12" units = "GB"/>    </Spec>    <price n = "950" units = "USD"/> </item> <item type = "Desktop" code = "Apple1679">    <make>    <brand>Apple iMac</brand>...
Consider the XML DTD definition below. Write a well-formed and valid XML Document that conforms to...
Consider the XML DTD definition below. Write a well-formed and valid XML Document that conforms to this definition. <!ELEMENT wine-catalog (wine+)> <!ELEMENT wine (properties,origin,price,year,tasting-note?)> <!ATTLIST wine    code   ID #REQUIRED name   #PCDATA #REQUIRED    classification #PCDATA #REQUIRED format (375ml|750ml) “750ml”> <!ELEMENT properties (color,alcohol-content)> <!ELEMENT color (#PCDATA)> <!ELEMENT alcohol-content (#PCDATA)> <!ELEMENT origin (country, region, producer)> <!ELEMENT country (#PCDATA)> <!ELEMENT region (#PCDATA)> <!ELEMENT producer (#PCDATA)> <!ELEMENT price (#PCDATA)> <!ELEMENT year (#PCDATA)> <!ELEMENT tasting-note (#PCDATA)>
Write a simple XML Schema file to define an XML document structure for simplified technical reports...
Write a simple XML Schema file to define an XML document structure for simplified technical reports (it must support tags for report title, chapter, two levels of sections, and item lists; more features for extra credits); write a sample XML document for technical report based on your Schema specification (the document should make reference to your external Schema file); validate your XML document against your Schema specification with my utility “SaxParse” to remove any bugs. Write a simple XSL stylesheet...
1. The following XML document describes some employees of a company. <?xml version="1.0" encoding="UTF-8"?> <company> <person...
1. The following XML document describes some employees of a company. <?xml version="1.0" encoding="UTF-8"?> <company> <person age="25" id="p29432" manager="p48293"> <ssn>123456789</ssn> <name> John Davis</name> <office>B432</office> <phone>1234</phone> </person> <person age="27" id="p29333" manager="p48222"> <ssn>987654321</ssn> <name>Jim Handler</name> <office>B123</office> </person> <person age=55 id="p29432" manager="p48221"> <ssn>123456789</ssn> <name> Christo Dichev</name> <office>A4210</office> <phone>2477</phone> </person> <person age="57" id="p29333" manager="p4832"> <ssn>987654321</ssn> <name>Elva Jones</name> <office>A4211</office> </person> </company> 1. Check if the XML document is well-formed. If it is not, change it so that it becomes wellformed, making as little changes as...
Create and test an HTML document for yourself, including your name, address, and electronic mail address....
Create and test an HTML document for yourself, including your name, address, and electronic mail address. If you are a student, you must include your major and your grade level. If you work, you must include your employer, your employer’s address, and your job title. This document must use several headings and <em>, <strong>, <hr />, <p>, and <br /> tags. 2.2 Add pictures of yourself and at least one other image (of your friend, spouse, or pet) 2.3 Add...
Create, test, and validate an HTML document for yourself, including your name, address, and email address....
Create, test, and validate an HTML document for yourself, including your name, address, and email address. If you are a student, you must include your major and your grade level. This document must use several headings and <em>, <strong>, <hr />, <p>, and <br /> tags.
Need C++ code for following with a document describing the code as well: Write a program...
Need C++ code for following with a document describing the code as well: Write a program to implement the game of Tic Tac Toe Four. The game is played on a 4 × 4 chessboard, within 2 players. The player who is playing "X" always goes first. Players alternate placing Xs and Os on the board until either one player has four in a row, horizontally, vertically, or diagonally; or all 16 squares are filled(which is a draw). The program...
The Person Class Uses encapsulation Attributes private String name private Address address Constructors one constructor with...
The Person Class Uses encapsulation Attributes private String name private Address address Constructors one constructor with no input parameters since it doesn't receive any input values, you need to use the default values below: name - "John Doe" address - use the default constructor of Address one constructor with all (two) parameters one input parameter for each attribute Methods public String toString() returns this object as a String, i.e., make each attribute a String, concatenate all strings and return as...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT