How to Write a Paper in XML Format

Writing a paper in proper XML style avoids receiving errors from any program that uses XML to import and read the data. You can create an XML file in a plain-text editor such as Windows Notepad or a third-party application. You must know the basic formatting procedures to create a properly formatted XML file.

Instructions

    • 1

      Click the Windows "Start" button and select "All Programs." Click "Accessories," then click "Notepad" to start the editor.

    • 2

      Add the XML version and encoding tag at the top of the file. This tag tells any XML-compliant program that the fields contained in the file are XML-formatted. Place the following code at the top of your file:

      <?xml version="1.0" encoding="ISO-8859-1"?>

    • 3

      Define the root node. The root node is the top-level node that encapsulates the data. For instance, the following root node encapsulates a list of orders:

      <orders>
      </orders>

    • 4

      Add the XML data. Place all of the data within the root node created in the previous step. The following XML code defines two records:

      <order>
      <id>345</id>
      <product>Book #1</product>
      </order>
      <order>
      <id>547</id>
      <product>Book #2</product>
      </order>

    • 5

      Save the file changes. When you save the file, append the ".xml" file extension to the file to define the file format as an XML file.

Related Searches:

References

Comments

Related Ads

Featured