Итак, у меня есть некоторый текст HTML, который я хотел бы отобразить в табличном представлении.
У меня есть две ячейки UITableView. Ячейка с кавычками и ячейка без кавычек.
Мне нужно иметь возможность разбить этот HTML-код на массив, где кавычки отображаются правильно
Другими словами, следующий html:
<div class='comment'>
This is some text before the quote
<div class='quote'>
This is some text in a quote
</div>
This is between the quotes
<div class='quote'>
This is text in another quote
<div class='unrelatedDiv'>
this is in an unrelated div
</div>
</div>
This is some text after the quote
</div>
Будет выглядеть примерно так в массиве, когда закончите.
Затем он будет загружен в мой tableView, который будет знать, что есть 5 разделов и что 1 и 3 должны быть кавычками.
[0] => "This is some text before the quote"
[1] => "This is some text in a quote"
[2] => "This is between the quotes"
[3] => "This is text in another quote \n this is in an unrelated div"
[4] => "This is some text after the quote"