S
S
Sibir9k2017-05-26 08:54:28
PHP
Sibir9k, 2017-05-26 08:54:28

How to get value from XML without CDATA?

Good afternoon. There is xml (yml market) in which there is a description with html tags without using pointing to character data
<![CDATA[
Example

<description>
<p>
текст
</p>
текст1
</description>

Standard data fetch only outputs 1 row
$offer->description
выдает только текст1

The question is how to get all the description data without changing the xml itself

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Vodakov, 2017-05-26
@WaterSmith

Well, it's obvious that you get a child tag "p" from the "description" tag, which means you need to extract it separately. With the rest of the HTML tags, the same trouble will come out.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question