Creating and Editing XML Documents

This section describes a tutorial example on how to create and edit an XML document with XMLPad.

As an XML editor, XMLPad can be used to create and edit XML documents. Here are the basic steps of creating and editing an XML document:

1. Run XMLPad, and click menu File > New. XMLPad shows a list of XML document types for you to select, XML Document, XSD Schema, XSL Stylesheet, Document Type Definition, WSDL Document, and RSS 2.0 Document.

2. Double click on the XML Document icon. XMLPad shows the "Create new XML document" dialog box:
XMLPad - Create XML Documents

3. Keep the default values on the "Create new XML document" dialog box as is:

DTD definition: Not assigned
Root Tag: nobody

4. Click OK. XMLPad will create a new XML document named as "Untitled.xml" with two lines:

<?xml version = "1.0" encoding = "utf-8"?>
<nobody> </nobody>

5. This is a nice starting point, but not good enough as real XML document. So let's modify this XML document to be a simple HTML document in XML format:

<?xml version = "1.0" encoding = "utf-8"?>
<html>
<body>My first HTML document in XML format.</body>
</html>

6. The last step is to click menu File > Save As. And save this XML document as c:\herong\first_html.xml.

Last update: 2013.

Table of Contents

 About This Book

 Introduction to XML Schema

XML Editor and Schema Processor - XMLPad

 Installing WMHelp XMLPad Pro

Creating and Editing XML Documents

 Creating and Editing XML Schema Documents

 Assigning XML Schema to XML Documents

 Validating XML Documents with Assigned XSD

 Validating Non-Conforming XML Documents

 XMLPad Crash When Validating Non-Conforming XML Documents

 Generating XML Schema Diagrams

 Generating XML Schema Documentations

 Java API for XML Processing - JAXP

 JAXP - XML Schema (XSD) Validation

 Xerces2 Java Parser - Java API of XML Parsers

 Using Xerces2 Java API

 XML Schema Language - Basics

 Introduction of XSD Built-in Datatypes

 "string" and Its Derived Datatypes

 "decimal" and Its Derived Datatypes

 "dateTime" and Its Related Datatypes

 Miscellaneous Built-in Datatypes

 Facets, Constraining Facets and Restriction Datatypes

 "simpleType" - Defining Your Own Simple Datatypes

 Complex Element Declaration

 Identity-Constraints: unique, key and keyref

 Assertion as Custom Validation Rules

 XML Schema Location and Namespace in XML Documents

 Overriding Element Types in XML Documents

 Linking Multiple Schema Documents Together

 Glossary

 References

 PDF Printing Version