|
HDK
|
#include <MaterialXCore/Library.h>#include <MaterialXCore/Document.h>#include <MaterialXFormat/Export.h>#include <MaterialXFormat/File.h>
Include dependency graph for XmlIo.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| class | XmlReadOptions |
| class | XmlWriteOptions |
| class | ExceptionParseError |
| class | ExceptionFileMissing |
Typedefs | |
| using | XmlReadFunction = std::function< void(DocumentPtr, const FilePath &, const FileSearchPath &, const XmlReadOptions *)> |
Variables | |
| MX_FORMAT_API const string | MTLX_EXTENSION |
| MX_FORMAT_API const int | MAX_XINCLUDE_DEPTH |
| MX_FORMAT_API const int | MAX_XML_TREE_DEPTH |
Support for the MTLX file format
Definition in file XmlIo.h.
| using XmlReadFunction = std::function<void(DocumentPtr, const FilePath&, const FileSearchPath&, const XmlReadOptions*)> |
| MX_FORMAT_API void prependXInclude | ( | DocumentPtr | doc, |
| const FilePath & | filename | ||
| ) |
| MX_FORMAT_API void readFromXmlBuffer | ( | DocumentPtr | doc, |
| const char * | buffer, | ||
| FileSearchPath | searchPath = FileSearchPath(), |
||
| const XmlReadOptions * | readOptions = nullptr |
||
| ) |
Read a Document as XML from the given character buffer.
| doc | The Document into which data is read. |
| buffer | The character buffer from which data is read. |
| searchPath | An optional sequence of file paths that will be applied in order when searching for the given file and its includes. This argument can be supplied either as a FileSearchPath, or as a standard string with paths separated by the PATH_SEPARATOR character. |
| readOptions | An optional pointer to an XmlReadOptions object. If provided, then the given options will affect the behavior of the read function. Defaults to a null pointer. |
| ExceptionParseError | if the document cannot be parsed. |
| MX_FORMAT_API void readFromXmlFile | ( | DocumentPtr | doc, |
| FilePath | filename, | ||
| FileSearchPath | searchPath = FileSearchPath(), |
||
| const XmlReadOptions * | readOptions = nullptr |
||
| ) |
Read a Document as XML from the given filename.
| doc | The Document into which data is read. |
| filename | The filename from which data is read. This argument can be supplied either as a FilePath or a standard string. |
| searchPath | An optional sequence of file paths that will be applied in order when searching for the given file and its includes. This argument can be supplied either as a FileSearchPath, or as a standard string with paths separated by the PATH_SEPARATOR character. |
| readOptions | An optional pointer to an XmlReadOptions object. If provided, then the given options will affect the behavior of the read function. Defaults to a null pointer. |
| ExceptionParseError | if the document cannot be parsed. |
| ExceptionFileMissing | if the file cannot be opened. |
| MX_FORMAT_API void readFromXmlStream | ( | DocumentPtr | doc, |
| std::istream & | stream, | ||
| FileSearchPath | searchPath = FileSearchPath(), |
||
| const XmlReadOptions * | readOptions = nullptr |
||
| ) |
Read a Document as XML from the given input stream.
| doc | The Document into which data is read. |
| stream | The input stream from which data is read. |
| searchPath | An optional sequence of file paths that will be applied in order when searching for the given file and its includes. This argument can be supplied either as a FileSearchPath, or as a standard string with paths separated by the PATH_SEPARATOR character. |
| readOptions | An optional pointer to an XmlReadOptions object. If provided, then the given options will affect the behavior of the read function. Defaults to a null pointer. |
| ExceptionParseError | if the document cannot be parsed. |
| MX_FORMAT_API void readFromXmlString | ( | DocumentPtr | doc, |
| const string & | str, | ||
| const FileSearchPath & | searchPath = FileSearchPath(), |
||
| const XmlReadOptions * | readOptions = nullptr |
||
| ) |
Read a Document as XML from the given string.
| doc | The Document into which data is read. |
| str | The string from which data is read. |
| searchPath | An optional sequence of file paths that will be applied in order when searching for the given file and its includes. This argument can be supplied either as a FileSearchPath, or as a standard string with paths separated by the PATH_SEPARATOR character. |
| readOptions | An optional pointer to an XmlReadOptions object. If provided, then the given options will affect the behavior of the read function. Defaults to a null pointer. |
| ExceptionParseError | if the document cannot be parsed. |
| MX_FORMAT_API void writeToXmlFile | ( | DocumentPtr | doc, |
| const FilePath & | filename, | ||
| const XmlWriteOptions * | writeOptions = nullptr |
||
| ) |
Write a Document as XML to the given filename.
| doc | The Document to be written. |
| filename | The filename to which data is written. This argument can be supplied either as a FilePath or a standard string. |
| writeOptions | An optional pointer to an XmlWriteOptions object. If provided, then the given options will affect the behavior of the write function. Defaults to a null pointer. |
| MX_FORMAT_API void writeToXmlStream | ( | DocumentPtr | doc, |
| std::ostream & | stream, | ||
| const XmlWriteOptions * | writeOptions = nullptr |
||
| ) |
Write a Document as XML to the given output stream.
| doc | The Document to be written. |
| stream | The output stream to which data is written |
| writeOptions | An optional pointer to an XmlWriteOptions object. If provided, then the given options will affect the behavior of the write function. Defaults to a null pointer. |
| MX_FORMAT_API string writeToXmlString | ( | DocumentPtr | doc, |
| const XmlWriteOptions * | writeOptions = nullptr |
||
| ) |
Write a Document as XML to a new string, returned by value.
| doc | The Document to be written. |
| writeOptions | An optional pointer to an XmlWriteOptions object. If provided, then the given options will affect the behavior of the write function. Defaults to a null pointer. |
| MX_FORMAT_API const int MAX_XINCLUDE_DEPTH |
| MX_FORMAT_API const int MAX_XML_TREE_DEPTH |
| MX_FORMAT_API const string MTLX_EXTENSION |