getElementsByTagName() method is used to select every element with the specified tag name.
When using this method, it converts the given input value into lowercase case, so it is not suitable when searching camel-cased element.
So instead of this, getElementsByTagNameNS() method can be used.
Example - Getting the element with specified tag name
- In the next step a for loop is created and every element in elem variable is displayed (alert(elem2.outerHTML);).