XMLUtils.h 523 B

12345678910111213141516171819202122
  1. /*
  2. * Copyright (c) 2023, Dan Klishch <danilklishch@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/StringView.h>
  8. #include <LibXML/Forward.h>
  9. namespace JSSpecCompiler {
  10. bool contains_empty_text(XML::Node const* node);
  11. Optional<StringView> get_attribute_by_name(XML::Node const* node, StringView attribute_name);
  12. Optional<StringView> get_text_contents(XML::Node const* node);
  13. Optional<XML::Node const*> get_single_child_with_tag(XML::Node const* element, StringView tag_name);
  14. }