Fix recursion, add iteration parameter
Avoid warnings due to "DOMDocument::loadHTML(): ID already defined in Entity" in JSON object