code: from llama_index.core.node_parser import HTMLNodeParser
  from llama_index.readers.file import FlatReader
  from pathlib import Path
  
  reader = FlatReader()
  document = reader.load_data(Path("files/others/sample.html"))
  
  my_tags = ["p", "span"]  
  html_parser = HTMLNodeParser(tags=my_tags)
  nodes = html_parser.get_nodes_from_documents(document)
  
  print('<span> elements:')
  for node in nodes:
      if node.metadata['tag']=='span':
          print(node.text)
   
  print('<p> elements:') 
  for node in nodes:
      if node.metadata['tag']=='p':
          print(node.text)
apis: llama_index.readers.file.FlatReader llama_index.core.node_parser.HTMLNodeParser
extract_api: [((139, 151), 'llama_index.readers.file.FlatReader', 'FlatReader', ([], {}), '()\n', (149, 151), False, 'from llama_index.readers.file import FlatReader\n'), ((255, 283), 'llama_index.core.node_parser.HTMLNodeParser', 'HTMLNodeParser', ([], {'tags': 'my_tags'}), '(tags=my_tags)\n', (269, 283), False, 'from llama_index.core.node_parser import HTMLNodeParser\n'), ((180, 212), 'pathlib.Path', 'Path', (['"""files/others/sample.html"""'], {}), "('files/others/sample.html')\n", (184, 212), False, 'from pathlib import Path\n')]