static inline bool match_ns(xmlNodePtr node, const String& ns, bool is_prefix) {
  if (ns.empty()) {
    return true;
  }
  if (node->ns == nullptr || node->ns->prefix == nullptr) {
    return false;
  }
  if (node->ns && !xmlStrcmp(is_prefix ? node->ns->prefix : node->ns->href,
                             (const xmlChar *)ns.data())) {
    return true;
  }
  return false;
}
static inline bool match_ns(xmlNodePtr node, const String& ns, bool is_prefix) {
  if (ns.empty()) {
    return true;
  }
  if (node->ns == nullptr || node->ns->prefix == nullptr) {
    return false;
  }
  if (node->ns && !xmlStrcmp(is_prefix ? node->ns->prefix : node->ns->href,
                             (const xmlChar *)ns.data())) {
    return true;
  }
  return false;
}