Форум программистов, компьютерный форум, киберфорум
HTML, CSS
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.67/6: Рейтинг темы: голосов - 6, средняя оценка - 4.67
0 / 0 / 0
Регистрация: 20.05.2009
Сообщений: 4

Не завалялся ли у кого parser NML to HTML на PHP

28.05.2009, 12:29. Показов 1300. Ответов 1
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
В общем такой вот злобный формат News Markup Language в нем надо выдрать то что находится между тегами <text>
XML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE doc SYSTEM "djnml-1.0b.dtd">
<doc msize="000005371" md5="bb674cafc241feb451bf3a2f3b15c255"    >    
<djnml publisher="DJN" docdate="20090526" product="DN" xml:lang="en-us" >
<administration>
<doc-modify docdate="20090525" product="DN" publisher="DJN" >
<modify-replace xpath="djnml/body/text">
<text>
<pre>
   (From THE WALL STREET JOURNAL) 
   By Evan Ramstad and SungHa Park </pre>
<p>
  SEOUL -- Tensions simmered in South Korea over the weekend suicide of former president Roh Moo-hyun, as the nation also grappled with North Korea&apos;s test of a nuclear device and several short-range missiles Monday. </p>
<p>
  The new tests hit this nation at a vulnerable time and complicate efforts by the government and Mr. Roh&apos;s representatives to manage the emotional situation. </p>
<p>
  Representatives and government officials struggled to agree on where to hold Mr. Roh&apos;s funeral. Late Monday, they neared an agreement to hold the ceremony on Friday on the grounds of a historic palace in front of the presidential office and residence. </p>
<p>
  There is a risk the service will turn into a demonstration by Mr. Roh&apos;s supporters. Many are angry over his death and say they believe he was driven to despair by an investigation into bribery and influence-peddling they say was politically motivated. </p>
<p>
  Mr. Roh, 62 years old, jumped from a 100-foot cliff near his home early Saturday morning. In a note written on a computer an hour beforehand, he expressed anguish about the unfolding bribery investigation, which also involved his wife, children and other relatives. Police said they determined there was no foul play in the death. </p>
<p>
  A self-taught lawyer, Mr. Roh was the country&apos;s fourth president after the adoption of a democratic constitution in 1987. He presided over a period of economic and business growth. As president, Mr. Roh extended his predecessor&apos;s efforts to reach out to North Korea, and four months before leaving office, held a summit with the North&apos;s leader, Kim Jong Il. </p>
<p>
  Since Mr. Roh&apos;s death, his supporters have lashed out at President Lee Myung-bak in the belief that prosecutors&apos; investigations are directed by the presidential office. South Korea has a history of presidents trying to discredit their predecessors through legal prosecution, particularly if they are from different parties. Mr. Roh was a progressive-nationalist and Mr. Lee a conservative. </p>
<p>
  During his tenure from 2003 to 2008, Mr. Roh broke many ties between the executive and judicial branches. The chief prosecutor in the investigation involving him was someone he appointed. </p>
<p>
  Mr. Roh&apos;s supporters decorated memorial sites with banners criticizing Mr. Lee. At the memorial in Mr. Roh&apos;s hometown of Gimhae, supporters on Sunday turned away conservative-party politicians, including the man Mr. Roh defeated to win the presidency in 2002. </p>
<p>
  &quot;Politically, I think we&apos;re heading into a very sensitive time,&quot; says Eugene Yun, a private-equity fund manager who was an adviser to Mr. Roh during his 2002 campaign. &quot;President Lee has a very, very difficult situation to manage. It&apos;s going to test his political skills to the maximum.&quot; </p>
<p>
  In the note composed shortly before his death, Mr. Roh wrote that he had caused pain to many people. &quot;Don&apos;t be sorry. Don&apos;t resent anyone. It&apos;s destiny,&quot; he wrote, before spelling out that he should be buried near his home. </p>
<p>
  Before becoming president, Mr. Roh twice served in the National Assembly and became a cabinet minister for his predecessor, Kim Dae-jung. His election was seen as the ascendancy of a new generation, and he filled his administration with former student activists from the 1980s. </p>
<p>
  Yet Mr. Roh&apos;s legacy was shaped by contradictions between his philosophy and behavior. </p>
<p>
  He built a reputation as a human-rights attorney defending student activists who fought for democracy in the 1980s. But as president, he said little about the absence of democracy in North Korea and that country&apos;s human-rights atrocities. In all but one year, he prevented South Korea from voting on measures realted to North Korea&apos;s human rights at the United Nations. </p>
<p>
  Mr. Roh&apos;s successor, President Lee, won office in part by promising to take a harder line with the North. He ended South Korea&apos;s unconditional assistance to North Korea in 2008, a step that cost the North about $300 million last year. </p>
<p>
  Before the nuclear test was announced, North Korea&apos;s state media announced that Mr. Kim sent a message of condolence to Mr. Roh&apos;s family. </p>
<pre>
 </pre>
<p>
  Click here to go to Dow Jones NewsPlus, a web front page of today&apos;s most important business and market news, analysis and commentary: [url]http://www.djnewsplus.com/access/al?rnd=LYvec0BNYdh%2B3mZJ%2BqTa8g%3D%3D[/url]. You can use this link on the day this article is published and the following day. </p>
<pre>
 
 </pre>
<p>
  (END) Dow Jones Newswires</p>
<p>
  May 25, 2009 17:34 ET (21:34 GMT)</p>
</text>
</modify-replace>
</modify-replace>
</doc-modify>
</administration>
</djnml>
</doc>
0
IT_Exp
Эксперт
34794 / 4073 / 2104
Регистрация: 17.06.2006
Сообщений: 32,602
Блог
28.05.2009, 12:29
Ответы с готовыми решениями:

Php simple html dom parser
Здравствуйте, дорогие форумчане. Начинаю изучать библиотеку парсинга php simple html dom parser. Возникло несколько вопросов. Вот...

PHP Simple HTML DOM Parser
Не подключается библиотека, на страничке написал 1 строчку с подключением include 'simple_html_dom.php'; запускаю и выдает ерор Parse...

PHP Simple HTML DOM Parser загрузка
Добрый вечер Подскажите есть сайт и там есть div с ид tab-3 Проблема в том что содержимое подгружается после загрузки страницы...

1
 Аватар для GalaX
701 / 573 / 59
Регистрация: 18.11.2008
Сообщений: 2,147
28.05.2009, 13:17
вот регуляркой можно сделать, например:
preg_match_all('/<text>(.*?)<\/text>/is', $txt, $arr);

$txt - здесь должен быть этот файл (в виде строки)
$arr - сюда будет результат помещаться (в виде массива)
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
BasicMan
Эксперт
29316 / 5623 / 2384
Регистрация: 17.02.2009
Сообщений: 30,364
Блог
28.05.2009, 13:17
Помогаю со студенческими работами здесь

Парсинг ссылок через PHP Simple HTML DOM Parser
Здравствуйте. Возникла проблема с работой данного скрипта. &lt;?php require_once 'simple_html_dom.php'; $data =...

Проблемка с PHP Simple HTML DOM Parser. Парсит, не останавливается на конце тега + кодировка
Собственно проблема, даже две :) 1) Есть кусок кода: .... $com = ' '; // еще один буфер foreach($elements as $element)...

PHP Simple HTML DOM Parser как заставить парсер работать из под каталога?
Добрый день ! Подскажите такую штуку - как их подключить этот плагин из другой директории? Необходимо перенести парсер на вп. Если я...

Нужно написать программу которая будет вычислять факториал. В нете много подобного, но хорошего не увидел. Может у кого код завалялся.
Помогите написать программу которая будет вычислять факториал. В нете много подобного, но хорошего не увидел. Может у кого код завалялся.


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
2
Ответ Создать тему
Новые блоги и статьи
SDL3 для Web (WebAssembly): Синхронизация спрайтов SDL3 и тел Box2D
8Observer8 04.03.2026
Содержание блога Финальная демка в браузере. Итоговый код: finish-sync-physics-sprites-sdl3-c. zip На первой гифке отладочные линии отключены, а на второй включены:. . .
SDL3 для Web (WebAssembly): Идентификация объектов на Box2D v3 - использование userData и событий коллизий
8Observer8 02.03.2026
Содержание блога Финальная демка в браузере. Итоговый код: finish-collision-events-sdl3-c. zip https:/ / www. cyberforum. ru/ blog_attachment. php?attachmentid=11680&amp;d=1772460536 Одним из. . .
Реалии
Hrethgir 01.03.2026
Нет, я не закончил до сих пор симулятор. Эта задача сложнее. Не получилось уйти в плавсостав, но оно и к лучшему, возможно. Точнее получалось - но сварщиком в палубную команду, а это значит, в моём. . .
Ритм жизни
kumehtar 27.02.2026
Иногда приходится жить в ритме, где дел становится всё больше, а вовлечения в происходящее — всё меньше. Плотный график не даёт вниманию закрепиться ни на одном событии. Утро начинается с быстрых,. . .
SDL3 для Web (WebAssembly): Сборка библиотек: SDL3, Box2D, FreeType, SDL3_ttf, SDL3_mixer и SDL3_image из исходников с помощью CMake и Emscripten
8Observer8 27.02.2026
Недавно вышла версия 3. 4. 2 библиотеки SDL3. На странице официальной релиза доступны исходники, готовые DLL (для x86, x64, arm64), а также библиотеки для разработки под Android, MinGW и Visual Studio. . . .
SDL3 для Web (WebAssembly): Реализация движения на Box2D v3 - трение и коллизии с повёрнутыми стенами
8Observer8 20.02.2026
Содержание блога Box2D позволяет легко создать главного героя, который не проходит сквозь стены и перемещается с заданным трением о препятствия, которые можно располагать под углом, как верхнее. . .
Конвертировать закладки radiotray-ng в m3u-плейлист
damix 19.02.2026
Это можно сделать скриптом для PowerShell. Использование . \СonvertRadiotrayToM3U. ps1 <path_to_bookmarks. json> Рядом с файлом bookmarks. json появится файл bookmarks. m3u с результатом. # Check if. . .
Семь CDC на одном интерфейсе: 5 U[S]ARTов, 1 CAN и 1 SSI
Eddy_Em 18.02.2026
Постепенно допиливаю свою "многоинтерфейсную плату". Выглядит вот так: https:/ / www. cyberforum. ru/ blog_attachment. php?attachmentid=11617&stc=1&d=1771445347 Основана на STM32F303RBT6. На борту пять. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru