Property | Description | |||
Method Name | ToFastInfosetFile | |||
Argument - stream | The stream to write the XML data to. | |||
Argument - decl | Indicates the type of Fast Infoset Header to use. Defaults to FInfoDecl_NONE. | |||
Argument - context |
The SerializationContext object controls the way in which XML is serialized/de-serialized. Its main role is to control the way in which validation is performed and which namespaces are output. The FIContext() method provides a FastInfosetContext structure which controls the way in which XML is serialized and de-serialized as a Fast Infoset document. It allows aspects of the Fast Infoset encoding to be changed for each Xml Data Type. Note: If you are writing a multithreaded app it is highly recommended that you use a different instance of this class on each thread, as access to the static instance is not synchronized. Although read only operations to the static instance (SerializationContext.Default) of the class are thread safe, if the global instance SerializationContext.Default is modified, then this could potentially cause threading problems. |
|||
Description | Writes XML from the current object to a file. | |||
Remarks |
If the file already exists it is overwritten, if it does not exist it is created. If the encoding is UTF-8 (the default) then the file is written out using the UTF-8 encoding scheme. It should be noted that UTF-8 encoding will encode characters using 1-4 bytes. As such if the file is examined with a viewer that is not capable of decoding UTF-8, it will appear to contain odd characters. However if it is viewed with a compliant viewer (e.g. IExplorer) the file will appear as expected. If the encoding selected is UNICODE, then the file is written out using 2 bytes per character. The standard 0xff 0xfe are placed at the beginning of the file to indicate to other applications that it is a UNICODE file. |