DTD to XML or JSON conversion library