Convert XML nodes to spans.