1 /* 2 * gnote 3 * 4 * Copyright (C) 2012,2017 Aurimas Cernius 5 * Copyright (C) 2009 Hubert Figuiere 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a 8 * copy of this software and associated documentation files (the "Software"), 9 * to deal in the Software without restriction, including without limitation 10 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 * and/or sell copies of the Software, and to permit persons to whom the 12 * Software is furnished to do so, subject to the following conditions: 13 * 14 * The above copyright notice and this permission notice shall be included in 15 * all copies or substantial portions of the Software. 16 * 17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 * DEALINGS IN THE SOFTWARE. 24 */ 25 26 27 28 29 #ifndef __SHARP_XML_HPP_ 30 #define __SHARP_XML_HPP_ 31 32 #include <vector> 33 34 #include <glibmm/ustring.h> 35 #include <libxml/tree.h> 36 37 namespace sharp { 38 39 40 typedef std::vector<xmlNodePtr> XmlNodeSet; 41 42 XmlNodeSet xml_node_xpath_find(const xmlNodePtr node, 43 const char * xpath); 44 45 Glib::ustring xml_node_xpath_find_single(const xmlNodePtr node, 46 const char * xpath); 47 48 xmlNodePtr xml_node_xpath_find_single_node(const xmlNodePtr node, 49 const char * xpath); 50 51 Glib::ustring xml_node_content(xmlNodePtr node); 52 53 Glib::ustring xml_node_get_attribute(const xmlNodePtr node, 54 const char * attr_name); 55 56 } 57 58 59 #endif 60