Table of Contents

Search

  1. Preface
  2. XML Concepts
  3. Using XML with PowerCenter
  4. Working with XML Sources
  5. Using the XML Editor
  6. Working with XML Targets
  7. XML Source Qualifier Transformation
  8. Midstream XML Transformations
  9. Appendix A: XML Datatype Reference
  10. Appendix B: XPath Query Functions Reference

XML Guide

XML Guide

Validating XML Files with a DTD or Schema

Validating XML Files with a DTD or Schema

A valid XML file conforms to the structure of an associated DTD or schema file.
To reference the location and name of a DTD file, use the DOCTYPE declaration in an XML file. The DOCTYPE declaration also names the root element for the XML file.
For example, the following XML file references the location of the note.dtd file:
<?xml version="1.0"?> <!DOCTYPE note SYSTEM
"http://www.w3schools.com/dtd/note.dtd">
<note>     <body>XML Data</body> </note>
To reference a schema, use the schemaLocation declaration. The schemaLocation contains the location and name of a schema.
The following XML file references the note.xsd schema in an external location:
<?xml version="1.0"?> <note
xsi:SchemaLocation="http://www.w3schools.com note.xsd">
   <body>XML Data</body> </note>

0 COMMENTS

We’d like to hear from you!