#include "output/spv/spv-legacy-decoder.h"
#include "output/spv/spv-light-decoder.h"
#include "output/spv/structure-xml-parser.h"
-#include "output/spv/vizml-parser.h"
+#include "output/spv/vizml-decoder.h"
#include "gl/c-ctype.h"
#include "gl/intprops.h"
struct spvxml_context ctx = SPVXML_CONTEXT_INIT (ctx);
struct spvdx_visualization *v;
spvdx_parse_visualization (&ctx, xmlDocGetRootElement (doc), &v);
- error = spvxml_context_finish (&ctx, &v->node_);
+ error = spvxml_context_finish (&ctx, v ? &v->node_ : NULL);
if (!error)
error = decode_spvdx_table (v, item->subtype, item->legacy_properties,
return error;
}
- struct spvxml_context ctx = SPVXML_CONTEXT_INIT (ctx);
- struct vizml_visualization *v;
- vizml_parse_visualization (&ctx, xmlDocGetRootElement (doc), &v);
- error = spvxml_context_finish (&ctx, &v->node_);
+ if (!error)
+ error = decode_vizml (xmlDocGetRootElement (doc), &data);
if (error)
{
}
spv_data_uninit (&data);
- vizml_free_visualization (v);
if (doc)
xmlFreeDoc (doc);
struct spvxml_context ctx = SPVXML_CONTEXT_INIT (ctx);
struct spvsx_root_heading *root;
spvsx_parse_root_heading (&ctx, xmlDocGetRootElement (doc), &root);
- error = spvxml_context_finish (&ctx, &root->node_);
+ error = spvxml_context_finish (&ctx, root ? &root->node_ : NULL);
if (!error && root->page_setup)
spv->page_setup = decode_page_setup (root->page_setup, file_name);