6#ifndef MATERIALX_XMLIO_H
7#define MATERIALX_XMLIO_H
24extern MX_FORMAT_API
const string MTLX_EXTENSION;
73 using Exception::Exception;
81 using Exception::Exception;
The top-level Document class.
shared_ptr< Document > DocumentPtr
A shared pointer to a Document.
Definition: Document.h:23
std::function< bool(ConstElementPtr)> ElementPredicate
A standard function taking an ElementPtr and returning a boolean.
Definition: Element.h:67
Cross-platform support for file and search paths.
Library-wide includes and types.
vector< string > StringVec
A vector of strings.
Definition: Library.h:56
std::function< void(DocumentPtr, const FilePath &, const FileSearchPath &, const XmlReadOptions *)> XmlReadFunction
A standard function that reads from an XML file into a Document, with optional search path and read o...
Definition: XmlIo.h:28
An exception that is thrown when a requested file cannot be opened.
Definition: XmlIo.h:79
The base class for exceptions that are propagated from the MaterialX library to the client applicatio...
Definition: Exception.h:23
An exception that is thrown when a requested document cannot be parsed.
Definition: XmlIo.h:71
A generic file path, supporting both syntactic and file system operations.
Definition: File.h:28
A sequence of file paths, which may be queried to find the first instance of a given filename on the ...
Definition: File.h:213
A set of options for controlling the behavior of XML read functions.
Definition: XmlIo.h:33
bool readComments
If true, then XML comments will be read into documents as comment elements.
Definition: XmlIo.h:44
StringVec parentXIncludes
The vector of parent XIncludes at the scope of the current document.
Definition: XmlIo.h:48
XmlReadFunction readXIncludeFunction
If provided, this function will be invoked when an XInclude reference needs to be read into a documen...
Definition: XmlIo.h:40
A set of options for controlling the behavior of XML write functions.
Definition: XmlIo.h:54
bool writeXIncludeEnable
If true, elements with source file markings will be written as XIncludes rather than explicit data.
Definition: XmlIo.h:61
ElementPredicate elementPredicate
If provided, this function will be used to exclude specific elements (those returning false) from the...
Definition: XmlIo.h:65