Previous Topic

Next Topic

Book Contents

Book Index

XML-Based Metadata

This chapter contains an example for defining metadata in an XML file. Shown XML metadata is of the "Server" type and indicates that this is a server application.

XML File

Listing 1. An example metadata XML.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE metatype-provider SYSTEM "D:\metatype\metatype.dtd">
<metatype-provider>
<objectclass load="true">
  <name>Server Metadata</name>
  <id>serverapp</id>
  <description>Meta data to test the "Server" metatype</description>
  <attribute modifier="req">
    <name>Server</name>
    <id>isServer</id>
    <description>Shows if the entity is a server</description>
    <type>&boolean;</type>
    <value>
      <scalar>true</scalar>
    </value>
  </attribute>
  <attribute modifier="req">
    <name>Port</name>
    <id>port</id>
    <description>Indicates the port the entity will use</description>
    <type>&int;</type>
    <value>
      <scalar>25</scalar>
    </value>
  </attribute>
</objectclass>
</metatype-provider>

Manifest Header

Config: xml=config.xml; pid=serverapp; name=Server Metadata; version=1.0.0