Go to the SVN repository for this file.
47 #include <libxml/tree.h> 54safety_(
ns::type_safe_ns)
59 xml::ns::ns(
const char* prefix,
const char* uri) : prefix_(prefix ? prefix :
""),
60uri_(uri ? uri :
""),
62safety_(
ns::type_safe_ns)
69 xml::ns::ns(
void* rawLibXML2Namespace) : prefix_(), uri_(),
70unsafe_ns_(rawLibXML2Namespace),
71safety_(
ns::type_unsafe_ns)
76prefix_(std::move(other.prefix_)),
77uri_(std::move(other.uri_)),
78unsafe_ns_(other.unsafe_ns_),
79safety_(other.safety_)
85 if(
this!= &other) {
86prefix_ = std::move(other.prefix_);
87uri_ = std::move(other.uri_);
88unsafe_ns_ = other.unsafe_ns_;
89safety_ = other.safety_;
98 returnprefix_.c_str();
101 returnprefix_.c_str();
103 return reinterpret_cast<xmlNs*
>(unsafe_ns_)->prefix
104?
reinterpret_cast<const char*
>(
reinterpret_cast<xmlNs*
>(unsafe_ns_)->prefix)
117 return reinterpret_cast<xmlNs*
>(unsafe_ns_)->href
118?
reinterpret_cast<const char*
>(
reinterpret_cast<xmlNs*
>(unsafe_ns_)->href)
131 return reinterpret_cast<xmlNs*
>(unsafe_ns_)->href ==
NULL;
142uri_ =
reinterpret_cast<xmlNs*
>(unsafe_ns_)->href
143?
std::string(
reinterpret_cast<const char*
>(
reinterpret_cast<xmlNs*
>(unsafe_ns_)->href))
145prefix_ =
reinterpret_cast<xmlNs*
>(unsafe_ns_)->prefix
146?
std::string(
reinterpret_cast<const char*
>(
reinterpret_cast<xmlNs*
>(unsafe_ns_)->prefix))
168 return!(*
this== other);
This exception class is thrown by xmlwrapp for all runtime XML-related errors along with the xml::par...
The xml::ns class is used to access and handle namespaces of nodes and attributes.
void make_safe(void)
Convert the namespace object to a safe one (i.e.
ns(void)
Use more explicit "ns(enum ns_type)" ctor to create "void" namespace.
const char * get_prefix(void) const
Get the namespace prefix.
ns & operator=(ns &&other)
Moving assignment.
const char * get_uri(void) const
Get the namespace URI.
bool is_safe(void) const
Check if the object is safe i.e.
bool operator==(const ns &other) const
Compare with another namespace.
bool operator!=(const ns &other) const
Compare with another namespace.
bool is_void(void) const
If a node or an attribute has no namespace, then a namespace with empty prefix and empty URI is retur...
XML namespace API for XmlWrapp.
This file contains the definition of the xml::exception class.
int strcmp(const char *str1, const char *str2)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4