XN_C_API XnStatus xnContextRunXmlScriptFromFile(XnContext* pContext, const XnChar* strFileName, XnEnumerationErrors* pErrors) { XnStatus nRetVal = XN_STATUS_OK; TiXmlDocument doc; nRetVal = xnXmlLoadDocument(doc, strFileName); XN_IS_STATUS_OK(nRetVal); return RunXmlScriptImpl(pContext, &doc, pErrors); }
XN_C_API XnStatus xnContextRunXmlScript(XnContext* pContext, const XnChar* xmlScript, XnEnumerationErrors* pErrors) { XnStatus nRetVal = XN_STATUS_OK; TiXmlDocument doc; if (!doc.Parse(xmlScript)) { XN_LOG_ERROR_RETURN(XN_STATUS_CORRUPT_FILE, XN_MASK_OPEN_NI, "Failed loading xml: %s [row %d, column %d]", doc.ErrorDesc(), doc.ErrorRow(), doc.ErrorCol()); } return RunXmlScriptImpl(pContext, &doc, pErrors); }
XnStatus XnXmlScriptNode::Run(xn::NodeInfoList& createdNodes, xn::EnumerationErrors& errors) { return RunXmlScriptImpl(m_context.GetUnderlyingObject(), &m_doc, createdNodes.GetUnderlyingObject(), errors.GetUnderlying()); }