in reply to XML::LibXML question: How can I know there is duplicate element exist?

Check this post: XML::LibXML getElementsById problem

You may be get into the trouble of DTD, you need to declare the attribute id is type ID in order to make the getElementsById (or getElementById) work in libXML (XML::Twig is much smarter that it will assume id is type ID, so use the xml:id as the first reply suggest.

  • Comment on Re: XML::LibXML question: How can I know there is duplicate element exist?