writeDocument

Serializes the document to the specified output stream using the default settings.

NDS Version:8.5

Syntax

C++

 #include "NativeInterface.h"
 
 int METHOD_CALL writeDocument (
    OutputStream         *outputStream,
    const unicode        *encoding,
    int                   endian);
 
 

Java

 public void writeDocument (
    java.io.OutputStream   document,
    java.lang.String       encoding)
 
 
 throws   java.io.IOException,
          java.io.UnsupportedEncodingException
 
 

Parameters

outputStream
Specifies the stream to which to write. This parameter cannot be zero (0).
encoding
Specifies the character encoding to use. If encoding is set to zero (0), the default encoding, UTF-8, is used.
endian
Specifies the byte-order: 0=little-endian, 1=big endian.

Remarks

A non-zero return value indicates success.

This is an overloaded method in Java. The writeDocument method can also write the contents to an XML writer.