|
|
|
|
Every XML document must have one, and only one, root element: <?xml version="1.0" encoding="utf-8"?> <address> <street>31 Concord Rd.</street> <city>Lower Farthing</city> <state>Old Hampshire</state> <zip>99999</zip> </address> In this case, the root element is The following is incorrect XML, because of the extra <?xml version="1.0" encoding="utf-8"?> <address> <street>31 Concord Rd.</street> <city>Lower Farthing</city> <state>Old Hampshire</state> <zip>99999</zip> </address> <address> <street>19 Farson St.</street> <city>Upper Grommet</city> <state>Old Jersey</state> <zip>99998</zip> </address> Click here to see what happens if you try to display the above XML in your browser. |
| The page was last updated February 19, 2008 |