A
A
Alexander2019-07-31 23:49:34
XML
Alexander, 2019-07-31 23:49:34

Why is the xml content not fully passed through guzzle?

Hello.
I get using guzzle xml from a remote resource.
For some reason, the result $response->getBody()->getContents()is a line without the first line of xml
(example: <?xml version="1.0" encoding="UTF-8"?>)..
And, as I understand it, because of this

new SimpleXMLElement($response->getBody()->getContents())
is an empty object?
Or am I parsing the xml response somehow wrong?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question