in reply to Re: XML to HashRef and then to JSON
in thread XML to HashRef and then to JSON

I accept your answer. What I have provided in my OP was just a sample and my XML is big and I manipulated the XML before converting it to a HashRef.
for $TmpNode ($dom->findnodes('//Emphasis')) { $tStr = $TmpNode->toString(1); $new_node = $dom->createTextNode( "$tStr" ); $TmpNode->replaceNode($new_node); }