svn: /phpdoc/ru/trunk/reference/simplexml/functions/ simplexml-import-dom.xml

From: Date: Fri, 19 Aug 2011 16:07:55 +0000
Subject: svn: /phpdoc/ru/trunk/reference/simplexml/functions/ simplexml-import-dom.xml
Groups: php.doc.ru 
Request: Send a blank email to doc-ru+get-2501@lists.php.net to get a copy of this message
aur Fri, 19 Aug 2011 16:07:55 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=315204 Log: Added translation by Mikhail Baranov (outside patch) Changed paths: A phpdoc/ru/trunk/reference/simplexml/functions/simplexml-import-dom.xml Added: phpdoc/ru/trunk/reference/simplexml/functions/simplexml-import-dom.xml =================================================================== --- phpdoc/ru/trunk/reference/simplexml/functions/simplexml-import-dom.xml (rev 0) +++ phpdoc/ru/trunk/reference/simplexml/functions/simplexml-import-dom.xml 2011-08-19 16:07:55 UTC (rev 315204) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- EN-Revision: 311775 Maintainer: aur Status: ready --> +<!-- Reviewed: no --> +<!-- $Revision$ --> +<refentry xml:id='function.simplexml-import-dom' xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>simplexml_import_dom</refname> + <refpurpose>Получает объект класса <literal>SimpleXMLElement</literal> из узла DOM.</refpurpose> + </refnamediv> + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>SimpleXMLElement</type><methodname>simplexml_import_dom</methodname> + <methodparam><type>DOMNode</type><parameter>node</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>class_name</parameter><initializer>"SimpleXMLElement"</initializer></methodparam> + </methodsynopsis> + <para> + Эта функция берет узел документа <link linkend="book.dom">DOM</link> + и превращает его в узел SimpleXML. Затем этот новый объект может + быть использован как первичный элемент SimpleXML. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>node</parameter></term> + <listitem> + <para> + Узел-элемент <link linkend="book.dom">DOM</link> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>class_name</parameter></term> + <listitem> + <para> + Вы можете использовать этот дополнительный параметр для того, чтобы функция + <function>simplexml_import_dom</function> возвращала объект + указанного класса. Этот класс должен расширять + класс <type>SimpleXMLElement</type>. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Возвращает <type>SimpleXMLElement</type> или &false; в случае возникновения ошибки. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Импорт DOM</title> + <programlisting role="php"> +<![CDATA[ +<?php +$dom = new DOMDocument; +$dom->loadXML('<books><book><title>чепуха</title></book></books>'); +if (!$dom) { + echo 'Ошибка при разборе документа'; + exit; +} + +$s = simplexml_import_dom($dom); + +echo $s->book[0]->title; +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +чепуха +]]> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>dom_import_simplexml</function></member> + <member><xref linkend="simplexml.examples-basic"/></member> + </simplelist> + </para> + </refsect1> + +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> Property changes on: phpdoc/ru/trunk/reference/simplexml/functions/simplexml-import-dom.xml ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native

« previous php.doc.ru (#2501) next »