Show TOC Start of Content Area

Background documentationBackground documentation Interface if_ixml_stream_factory  Locate the document in its SAP Library structure

The iXMLStreamFactory serves as a factory for XML streams, which implement the AiXMLIStream or AiXMLOStream interface.

A client applications creates its stream factory instance by calling the iXML::createStreamFactory() factory method().

Factory methods use the prototype concept to instantiate the appropriate XML stream implementation on request. Additional prototypes can be registered with the StreamFactory to extend the default repertoire of supported stream types.

The essential assumption made about stream targets is their property to be addressable using a URL scheme. The protocol part of the URL can then be used to distinguish between different types of streams. I.e. there can be a stream implementation for file i/o (protocol: "file://...") and a separate one for http over the internet (protocol: "http://..."). For new stream targets or sources new protocols have probably to be introduced (e.g. protocol "sapr3://..." to address targets in the SAP NW AS ABAP transmitted and stored in internal tables or RFC tables).

specializes

·    if_ixml_unknown

enumerations

methods

·    create_istream_cstring

·    create_istream_itable

·    create_istream_string

·    create_istream_uri

·    create_istream_xstring

·    create_ostream_cstring

·    create_ostream_itable

·    create_ostream_uri

·    create_ostream_xstring

·    query_interface

 

 

method create_istream_cstring

This method creates a new XML input stream for the given ABAP string (string of type C). The encoding used in the stream is automatically assumed to be the currently set SAP codepage.

interface

if_ixml_stream_factory

parameters

string

The string for which to create the stream.

return value

Returns an interface pointer to the new input stream if successful, null otherwise.

abap signature

method create_istream_cstring
            importing
                string type string
            returning
                value(rval) type ref to if_ixml_istream.

 

 

method create_istream_itable

This method creates a new XML input stream for the given internal table. The table must contain raw data only.

interface

if_ixml_stream_factory

parameters

table

The table for which to create the stream.

size

The number of bytes in the table.

return value

Returns an interface pointer to the new input stream if successful, null otherwise.

abap signature

method create_istream_itable
            importing
                table type table
                size type I
            returning
                value(rval) type ref to if_ixml_istream.

 

 

method create_istream_string

This method creates a new XML input stream for the string. The content of the string must already be UCS-2 encoded (machine endian).

interface

if_ixml_stream_factory

parameters

string

The string for which to create the stream.

return value

Returns an interface pointer to the new input stream if successful, null otherwise.

abap signature

method create_istream_string
            importing
                string type string
            returning
                value(rval) type ref to if_ixml_istream.

 

 

method create_istream_uri

This method creates a new XML input stream for the given system ID (URL format) or optional public ID.

interface

if_ixml_stream_factory

parameters

system_id

The system ID of the input source. The system ID has URL format.

public_id [ default '' ]

The public ID of the input source (optional). The public ID follows the rules about public IDs as described in the XML 1.0 Specification.

return value

Returns an interface pointer to the new input stream if successful, null otherwise.

abap signature

method create_istream_uri
            importing
                system_id type string
                public_id type string default ''
            returning
                value(rval) type ref to if_ixml_istream.

 

 

method create_istream_xstring

This method creates a new XML input stream for the given ABAP xstring (string of type X).

interface

if_ixml_stream_factory

parameters

string

The string for which to create the stream.

return value

Returns an interface pointer to the new input stream if successful, null otherwise.

abap signature

method create_istream_xstring
            importing
                string type xstring
            returning
                value(rval) type ref to if_ixml_istream.

 

 

method create_ostream_cstring

This method creates a new XML output stream for the given ABAP string (string of type C). The encoding used in the stream is automatically assumed to be the currently set SAP codepage.

interface

if_ixml_stream_factory

parameters

string

The string for which to create the stream.

return value

Returns an interface pointer to the new output stream if successful, null otherwise.

abap signature

method create_ostream_cstring
            importing
                string type string
            returning
                value(rval) type ref to if_ixml_ostream.

 

 

method create_ostream_itable

This method creates a new XML output stream for the given internal table.

interface

if_ixml_stream_factory

parameters

table

The table for which to create the stream.

return value

Returns an interface pointer to the new output stream if successful, null otherwise.

abap signature

method create_ostream_itable
            importing
                table type table
            returning
                value(rval) type ref to if_ixml_ostream.

 

 

method create_ostream_uri

This method creates a new XML output stream for the given system ID (URL format) or optional public ID.

interface

if_ixml_stream_factory

parameters

system_id

The system ID of the output target. The system ID has URL format.

public_id [ default '' ]

The public ID of the output target (optional). The public ID follows the rules about public IDs as described in the XML 1.0 Specification.

return value

Returns an interface pointer to the new input stream if successful, null otherwise.

abap signature

method create_ostream_uri
            importing
                system_id type string
                public_id type string default ''
            returning
                value(rval) type ref to if_ixml_ostream.

 

 

method create_ostream_xstring

This method creates a new XML output stream for the given ABAP xstring (string of type X).

interface

if_ixml_stream_factory

parameters

string

The string for which to create the stream.

return value

Returns an interface pointer to the new output stream if successful, null otherwise.

abap signature

method create_ostream_xstring
            importing
                string type xstring
            returning
                value(rval) type ref to if_ixml_ostream.

 

 

method query_interface

Queries the specified interface.

interface

if_ixml_stream_factory

parameters

iid

The interface ID of the interface to query.

return value

Returns a reference to the queried interface or null if no such interface is supported.

abap signature

method query_interface
            importing
                iid type I
            returning
                value(rval) type I.

 

 

 

End of Content Area