X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_xml.h;h=16a93cbcb71f618fc73ec1fca0b4e78a0e847049;hb=60ad6a41c6d0ee08ed689e8505eb0c3df0c2a289;hp=fc2c8d63c329b2f54ff65925b1b1dc1eb5abb2f7;hpb=d9557a9bea506fd8b40acd7a44a16b46e2a97848;p=palacios.git diff --git a/palacios/include/palacios/vmm_xml.h b/palacios/include/palacios/vmm_xml.h index fc2c8d6..16a93cb 100644 --- a/palacios/include/palacios/vmm_xml.h +++ b/palacios/include/palacios/vmm_xml.h @@ -50,7 +50,7 @@ struct v3_xml { // structure. For efficiency, modifies the data by adding null terminators // and decoding ampersand sequences. If you don't want this, copy the data and // pass in the copy. Returns NULL on failure. -struct v3_xml * v3_xml_parse_str(char * s, size_t len); +struct v3_xml * v3_xml_parse(char * buf); // returns the name of the given tag @@ -76,6 +76,8 @@ struct v3_xml * v3_xml_idx(struct v3_xml * xml, int idx); const char *v3_xml_attr(struct v3_xml * xml, const char * attr); + + // Traverses the v3_xml sturcture to retrieve a specific subtag. Takes a // variable length list of tag names and indexes. The argument list must be // terminated by either an index of -1 or an empty string tag name. Example: @@ -88,4 +90,18 @@ struct v3_xml * v3_xml_get(struct v3_xml * xml, ...); // frees the memory allocated for an v3_xml structure void v3_xml_free(struct v3_xml * xml); + + + + + +char * v3_xml_tostr(struct v3_xml * xml); + +struct v3_xml * v3_xml_insert(struct v3_xml * xml, struct v3_xml * dest, size_t off); +struct v3_xml * v3_xml_set_txt(struct v3_xml * xml, const char *txt); + + +struct v3_xml * v3_xml_set_attr(struct v3_xml * xml, const char * name, const char * value); + + #endif // __VMM_XML_H