Published
Edited
Dec 11, 2020
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
evaluate(tasks_xml, "//to-do")
Insert cell
Insert cell
Insert cell
evaluate(haystack_xml, "//to-do")
Insert cell
Insert cell
Insert cell
Insert cell
evaluate(haystack_xml, "//todo")
Insert cell
Insert cell
Insert cell
evaluate(haystack_xml, "//todo")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
evaluate(longer_tasks_xml, "//to-do")
Insert cell
Insert cell
evaluate(longer_tasks_xml, "tasks/to-do")
Insert cell
Insert cell
Insert cell
evaluate(person_tasks_xml, "//tasks/to-do")
Insert cell
Insert cell
evaluate(person_tasks_xml, "//organization/person/tasks/to-do")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
evaluate(longer_tasks_xml, "your-xpath-here")
Insert cell
Insert cell
Insert cell
tasks_xml
Insert cell
Insert cell
evaluate(tasks_xml, "//to-do")
Insert cell
Insert cell
evaluate(tasks_xml, "count(//to-do)")
Insert cell
Insert cell
Insert cell
evaluate(longer_tasks_xml, "count(fill-in-your-xpath)")
Insert cell
Insert cell
Insert cell
Insert cell
evaluate(tasks_xml, "//to-do[@completed]")
Insert cell
Insert cell
evaluate(tasks_xml, "count(//to-do[@completed])")
Insert cell
Insert cell
Insert cell
evaluate(misleading_tasks_xml, "//to-do[@completed]")
Insert cell
Insert cell
evaluate(misleading_tasks_xml, "//to-do[@completed='yes']")
Insert cell
Insert cell
Insert cell
evaluate(case_tasks_xml, "//to-do[@completed='yes']")
Insert cell
Insert cell
Insert cell
evaluate(tasks_xml, "fn:string-join(//to-do)")
Insert cell
md`## Namespaces`
Insert cell
Insert cell
Insert cell
function displayNode(node) {
return `<span style="background-color: #eee; border-radius: 4px; padding: 4px 2px 4px 6px"><code>${node.tagName || node.nodeName}</code> element <span style="background-color: white; border-radius: 4px; padding: 2px 6px;">${node.textContent}</span></span>`;
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more