xmlparser

ModuleIsomorphic

XML/HTML parsing and filtering functions

Documentation

xmlparserparsetextstringoptionsParseOptionsNodeselectselectorstringnodeNodeNode

Functions for parsing XML and HTML strings and selecting data from the resulting structure using CSS selectors. selectors syntax supports combinations of tag names (h1), classnames (.btn), ids (#content), and attributes ([disabled], [for=password]).

NodestringtagstringattributesobjectchildrenNode
ParseOptionshtmlfalsebooleanomitWhitespacefalseboolean

Setting html to true allows the parser to observe self-closing tags and other HTML-specific parsing logic. omitWhitespace will omit whitespace-only nodes between elements in the resulting structure.