Skip to main content

Projection of Stream Classes to XML Types

Projection of Stream Classes to XML Types

If a class or a property is based on an InterSystems IRIS stream, it is projected to an XML type as shown in the following table:

XML Types for InterSystems IRIS Streams
InterSystems IRIS Stream Type XSD Type Used in Projections to XML
%Library.GlobalCharacterStreamOpens in a new tab, %Library.FileCharacterStreamOpens in a new tab, %Stream.FileCharacterOpens in a new tab, and %Stream.GlobalCharacterOpens in a new tab string
%Library.GlobalBinaryStreamOpens in a new tab, %Library.FileBinaryStreamOpens in a new tab, %Stream.FileBinaryOpens in a new tab, and %Stream.GlobalBinaryOpens in a new tab base64Binary

For example, consider the following class:

Class Schema.StreamPropDemo Extends (%Persistent, %XML.Adaptor)
{

Parameter XMLTYPENAMESPACE="mytypes";

Property BinStream As %Library.GlobalBinaryStream;

Property CharStream As %Library.GlobalCharacterStream;

}

The schema for this class is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:s="http://www.w3.org/2001/XMLSchema" 
elementFormDefault="qualified" targetNamespace="mytypes">
  <complexType name="StreamPropDemo">
    <sequence>
      <element minOccurs="0" name="BinStream" type="s:base64Binary"/>
      <element minOccurs="0" name="CharStream" type="s:string"/>
    </sequence>
  </complexType>
</schema>
FeedbackOpens in a new tab