I'm trying to work with the wolfram alpha api and I want to get a count back of how many <plaintext></plaintext>
elements there are so I can run through them with dom.getElementsByTagName
Just use,
dom.getElementsByTagName("plaintext").length
getElementsByTagName()
returns a NodeList which has a property length
.