Skip to content

XmlToArray::convertDomElement() must be an instance of DOMElement, instance of DOMComment given #9

Description

@skalero01

Hi, i am trying to convert the next xml: http://gd2.mlb.com/components/game/mlb/year_2019/month_05/day_02/gid_2019_05_02_slnmlb_wasmlb_1/atv_preview.xml

But it doesnt work i get the next error:

Argument 1 passed to Vyuldashev\XmlToArray\XmlToArray::convertDomElement() must be an instance of DOMElement, instance of DOMComment given, called in vendor\vyuldashev\xml-to-array\src\XmlToArray.php on line 105 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Argument 1 passed to Vyuldashev\\XmlToArray\\XmlToArray::convertDomElement() must be an instance of DOMElement, instance of DOMComment given, called in vendor\\vyuldashev\\xml-to-array\\src\\XmlToArray.php on line 105 at vendor\\vyuldashev\\xml-to-array\\src\\XmlToArray.php:58)

If i remove the comments on there i get the next error

Illegal string offset 'leftLabel' {"exception":"[object] (ErrorException(code: 0): Illegal string offset 'leftLabel' at vendor\\vyuldashev\\xml-to-array\\src\\XmlToArray.php:87)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions