I am searching empty xml tag. For e.g.,
<employee>
<name></name>
</employee>
<employee>
<name>abc</name>
</employee>
Here how to find empty tag(name tag) using Node.js?
I am searching empty xml tag. For e.g.,
<employee>
<name></name>
</employee>
<employee>
<name>abc</name>
</employee>
Here how to find empty tag(name tag) using Node.js?
You have to traverse through all the relevant tags and check their content. If the content is found to be null then the tag is empty. Below is a piece of code to help you along the way.
var emptytext=txtElement[0].childNodes[0];
if(emptytext===null)
{
alert("Text is empty");
}