Oracle XML Specifications

Oracle defines the XML format so that the XML contents can be understood, parsed and printed on labels. The XML Document Type Definition (DTD) defines the XML tags that are used in an XML file. Oracle generates XML files according to this DTD, and any 3rd party software translates XML files according to this DTD.

To execute an Oracle XML command file, use the Run Oracle XML Command File action.

XML DTD

The following is the XML DTD that is used while forming an XML for both – synchronous and asynchronous XML formats. The DTD defines elements that are used in the XML file, list of their attributes, and next level elements.

<!ELEMENT labels (label)*>
<!ATTLIST labels _FORMAT CDATA #IMPLIED>
<!ATTLIST labels _JOBNAME CDATA #IMPLIED>
<!ATTLIST labels _QUANTITY CDATA #IMPLIED>
<!ATTLIST labels _PRINTERNAME CDATA #IMPLIED>
<!ELEMENT label (variable)*>
<!ATTLIST label _FORMAT CDATA #IMPLIED>
<!ATTLIST label _JOBNAME CDATA #IMPLIED>
<!ATTLIST label _QUANTITY CDATA #IMPLIED>

Sample Oracle XML

This is the Oracle XML providing data for one label (there is only one <label> element).

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE labels SYSTEM "label.dtd">
<labels _FORMAT ="Serial.nlbl" _QUANTITY="1" _PRINTERNAME="" _JOBNAME="Serial">
    <label>
        <variable name= "item">O Ring</variable>
        <variable name= "revision">V1</variable>
        <variable name= "lot">123</variable>
        <variable name= "serial_number">12345</variable>
        <variable name= "lot_status">123</variable>
        <variable name= "serial_number_status">Active</variable>
        <variable name= "organization">A1</variable>
    </label>
</labels>

When executing this sample Oracle XML file, the label serial.nlbl is printed with the following variable values.

Variable name

Variable value

item

O Ring

revision

V1

lot

123

serial_number

12345

lot_status

123

serial_number_status

Active

organization

A1

There will be 1 printed copy of the label with spooler job name Serial. The printer name is not specified in the XML file, so the label prints to the printer as defined in the label template.