[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
How_To_XML_Create_XML_Document

How to create an XML document?

An XML document can be thought of as an HTML document. However in the case of XML, you can define your own tag names, attributes and their values. XML documents can be created in a text editor (such as notepad) and saved with an .xml extension.

All valid XML documents must contain an XML declaration which is currently <?xml version="1.0"?>. Also a root element is needed. In this example the root element is <books>. The number of child elements within the root (in this case <book>) is unlimited.

<?xml version="1.0"?>
<books>
   <book>
	<title>OpenGL Programming Guide Fourth Edition</title>
	<location>107</location>
	<publisher>Addison-Wesley</publisher>
	<year>2004</year>
   </book>
   <book>
	<title>Curves and Surfaces for CAGD: A Practical Guide</title>
	<location>116</location>
	<publisher>Academic Press</publisher>
	<year>2002</year>
   </book>
   <book>
	<title>An Introduction to NURBS: With Historical Perspective</title>
	<location>120</location>
	<publisher>Academic Press</publisher>
	<year>2001</year>
   </book>
   <book>
	<title>NURBS: From Projective Geometry to Practical Use</title>
	<location>126</location>
	<publisher>A K Peters</publisher>
	<year>1999</year>
   </book>
</books>


XML FAQ

last edited (April 28, 2004) by leeos, Number of views: 2996, Current Rev: 10 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.