6 #ifndef MATERIALX_XMLIO_H
7 #define MATERIALX_XMLIO_H
27 using XmlReadFunction = std::function<void(DocumentPtr, const FilePath&, const FileSearchPath&, const XmlReadOptions*)>;
MX_FORMAT_API void readFromXmlStream(DocumentPtr doc, std::istream &stream, FileSearchPath searchPath=FileSearchPath(), const XmlReadOptions *readOptions=nullptr)
GT_API const UT_StringHolder filename
StringVec parentXIncludes
std::function< bool(ConstElementPtr)> ElementPredicate
A standard function taking an ElementPtr and returning a boolean.
#define MATERIALX_NAMESPACE_BEGIN
vector< string > StringVec
A vector of strings.
MX_FORMAT_API void writeToXmlFile(DocumentPtr doc, const FilePath &filename, const XmlWriteOptions *writeOptions=nullptr)
MX_FORMAT_API const string MTLX_EXTENSION
MX_FORMAT_API void readFromXmlFile(DocumentPtr doc, FilePath filename, FileSearchPath searchPath=FileSearchPath(), const XmlReadOptions *readOptions=nullptr)
MX_FORMAT_API void readFromXmlBuffer(DocumentPtr doc, const char *buffer, FileSearchPath searchPath=FileSearchPath(), const XmlReadOptions *readOptions=nullptr)
MX_FORMAT_API void writeToXmlStream(DocumentPtr doc, std::ostream &stream, const XmlWriteOptions *writeOptions=nullptr)
XmlReadFunction readXIncludeFunction
MX_FORMAT_API void readFromXmlString(DocumentPtr doc, const string &str, const FileSearchPath &searchPath=FileSearchPath(), const XmlReadOptions *readOptions=nullptr)
shared_ptr< Document > DocumentPtr
A shared pointer to a Document.
Exception(const string &msg)
MX_FORMAT_API string writeToXmlString(DocumentPtr doc, const XmlWriteOptions *writeOptions=nullptr)
#define MATERIALX_NAMESPACE_END
MX_FORMAT_API void prependXInclude(DocumentPtr doc, const FilePath &filename)
std::function< void(DocumentPtr, const FilePath &, const FileSearchPath &, const XmlReadOptions *)> XmlReadFunction
ElementPredicate elementPredicate