18 #ifndef VCSN_XML_TOOLS_HXX
19 # define VCSN_XML_TOOLS_HXX
21 # include <vaucanson/xml/strings.hh>
35 has_attribute (
const xercesc::Attributes& attrs,
37 const XMLCh*
const uri)
39 return (get_attribute(attrs, key, uri) != 0);
44 has_attribute (
const xercesc::Attributes& attrs,
46 const XMLCh*
const uri)
48 return (get_attribute(attrs, xkey, uri) != 0);
53 get_attribute (
const xercesc::Attributes& attrs,
55 const XMLCh*
const uri)
57 XMLCh* xkey = transcode(key);
58 const XMLCh* tmp = attrs.getValue(uri, xkey);
59 xercesc::XMLString::release(&xkey);
65 get_attribute (
const xercesc::Attributes& attrs,
67 const XMLCh*
const uri)
69 const XMLCh* tmp = attrs.getValue(uri, xkey);
77 set_attribute (xercesc::DOMElement* e,
78 const std::string& k,
const std::string& v)
81 e->setAttribute (transcode(k), transcode(v));
87 create_element(xercesc::DOMDocument* doc,
90 return doc->createElementNS(transcode(VCSN_XMLNS), transcode(e));
96 #endif // !VCSN_XML_TOOLS_HXX