Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > by-pkgid > 703d980c580707c382b4e43e25965bc5 > files > 12114

php-manual-pt_BR-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>XML, Analisadores</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Manual do PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="Referência das Funções"
HREF="funcref.html"><LINK
REL="PREVIOUS"
TITLE="xdiff_string_patch"
HREF="function.xdiff-string-patch.html"><LINK
REL="NEXT"
TITLE="utf8_decode"
HREF="function.utf8-decode.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></HEAD
><BODY
CLASS="reference"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Manual do PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.xdiff-string-patch.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.utf8-decode.html"
ACCESSKEY="N"
>Próxima</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="reference"
><A
NAME="ref.xml"
></A
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="title"
>CLXXIX. XML, Analisadores</H1
><DIV
CLASS="PARTINTRO"
><A
NAME="AEN233695"
></A
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xml.intro"
>Introdução</A
></H1
><P
>&#13;     XML (eXtensible Markup Language) é um formato de dados para intercâmbio de documentos na Web. Ele é um padrão definido pela
     The World Wide Web consortium (W3C).  Informações sobre XML e tecnologias
     relacionadas pode, ser encontradas em <A
HREF="http://www.w3.org/XML/"
TARGET="_top"
>http://www.w3.org/XML/</A
>.
    </P
><P
>&#13;     Esta extensão do PHP implementa suporte para o James Clark's
     <SPAN
CLASS="productname"
>expat</SPAN
> no PHP.  Esta ferramenta permite 
	 que você analise, mas não valide, documentos XML.  Ele suporta três
     source <A
HREF="ref.xml.html#xml.encoding"
>character encodings</A
>
     também fornecido pelo PHP: <TT
CLASS="literal"
>US-ASCII</TT
>,
     <TT
CLASS="literal"
>ISO-8859-1</TT
> e <TT
CLASS="literal"
>UTF-8</TT
>.
     <TT
CLASS="literal"
>UTF-16</TT
> não é suportado.
    </P
><P
>&#13;     Esta extensão te permite <A
HREF="function.xml-parser-create.html"
>criar analisadores XML</A
>
     e então definir <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>manipuladores (handlers)</I
></SPAN
> para diferentes eventos 
	 XML. Cada analisador XML também tem alguns <A
HREF="function.xml-parser-set-option.html"
>parâmetros</A
> que você
     pode ajustar.
    </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xml.requirements"
>Dependências</A
></H1
><P
>&#13;     Esta extensão utiliza o <SPAN
CLASS="productname"
>expat</SPAN
>, que pode ser 
	 encontrado em <A
HREF="http://www.jclark.com/xml/expat.html"
TARGET="_top"
>http://www.jclark.com/xml/expat.html</A
>. O 
     makefile que vem com o expat, por definição não constrói uma biblioteca,
	 você pode usar as regras de 'make' para isso:
     <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="makefile"
>libexpat.a: $(OBJS)
    ar -rc $@ $(OBJS)
    ranlib $@</PRE
></TD
></TR
></TABLE
>
     Um pacote dos fontes RPM do expat podem ser encontrados em <A
HREF="http://sourceforge.net/projects/expat/"
TARGET="_top"
>http://sourceforge.net/projects/expat/</A
>.
    </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xml.installation"
>Instalação</A
></H1
><P
>&#13;  Estas funções estão por definição habilitadas, usando o pacote expat library.
  Você pode desabilitar o suporte a XML com
  <CODE
CLASS="option"
>--disable-xml</CODE
>.
  Se você compilou o PHP como um módulo do Apache 1.3.9 ou mais novo, o PHP 
  automaticamente utilizará o pacote <SPAN
CLASS="productname"
>expat</SPAN
> library do
  Apache. Regularmente você não quer utilizar a configuração do pacote expat library 
  do PHP <CODE
CLASS="option"
>--with-expat-dir=DIR</CODE
>, onde DIR apontaria
  para o diretório base de instalação do expat.
 </P
><P
>A versão para Windows do <TT
CLASS="literal"
>PHP</TT
>
 tem suporte embutido para esta extensão. Você não precisa carregar nenhuma extensão
 adicional para utilizar essas funções.</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xml.configuration"
>Configurações em execução</A
></H1
><P
>Esta extensão não define nenhum parâmetro de configuração no <TT
CLASS="filename"
>php.ini</TT
>.</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xml.resources"
>Tipos Resource</A
></H1
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="xml.resources.xml"
><TT
CLASS="literal"
>xml</TT
></A
></H2
><P
>&#13;      O recurso <TT
CLASS="literal"
>xml</TT
> enquanto retornado por
      <A
HREF="function.xml-parser-create.html"
><B
CLASS="function"
>xml_parser_create()</B
></A
> e
      <A
HREF="function.xml-parser-create-ns.html"
><B
CLASS="function"
>xml_parser_create_ns()</B
></A
> refere-se a uma instância do analisador xml para ser usada coms as funções fornecidas por esta extensão.
     </P
></DIV
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xml.constants"
>Constantes pré-definidas</A
></H1
><P
>&#13;As contantes abaixo são definidas por esta extensão e somente
 estarão disponíveis quando a extensão foi compilada com o PHP
 ou carregada dinamicamente durante a execução.
</P
><P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_NONE</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_NO_MEMORY</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_SYNTAX</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_NO_ELEMENTS</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_INVALID_TOKEN</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_UNCLOSED_TOKEN</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_PARTIAL_CHAR</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_TAG_MISMATCH</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_DUPLICATE_ATTRIBUTE</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_JUNK_AFTER_DOC_ELEMENT</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_PARAM_ENTITY_REF</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_UNDEFINED_ENTITY</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_RECURSIVE_ENTITY_REF</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_ASYNC_ENTITY</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_BAD_CHAR_REF</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_BINARY_ENTITY_REF</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_MISPLACED_XML_PI</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_UNKNOWN_ENCODING</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_INCORRECT_ENCODING</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_UNCLOSED_CDATA_SECTION</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_ERROR_EXTERNAL_ENTITY_HANDLING</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_OPTION_CASE_FOLDING</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_OPTION_TARGET_ENCODING</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_OPTION_SKIP_TAGSTART</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>XML_OPTION_SKIP_WHITE</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>integer</B
></A
>)</DT
><DD
><P
>&#13;     
    </P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xml.eventhandlers"
>Manipuladores (handlers) de Evento</A
></H1
><P
>&#13;      Os manipuladores (handlers) de eventos de XML definidos são:
      <DIV
CLASS="table"
><A
NAME="AEN233902"
></A
><P
><B
>Tabela 1. Manipuladores XML Suportados</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><THEAD
><TR
><TH
>função do PHP para definir o manipulador(handler)</TH
><TH
>Descrição do evento</TH
></TR
></THEAD
><TBODY
><TR
><TD
><A
HREF="function.xml-set-element-handler.html"
><B
CLASS="function"
>xml_set_element_handler()</B
></A
></TD
><TD
>&#13;           Eventos elementares são emitidos toda vez que o analisador XML
           o início ou o fim das tags. Há manipuladores (handlers) separadores para tags de
           início e tags de fim.
          </TD
></TR
><TR
><TD
>&#13;           <A
HREF="function.xml-set-character-data-handler.html"
><B
CLASS="function"
>xml_set_character_data_handler()</B
></A
>
          </TD
><TD
>&#13;           Dados de caractere são aproximadamente todo o conteúdo de 
           documentos XML, incluindo espaços em branco entre as tags. Note
           que o analisador XML não adiciona ou remove qualquer espaço em 
		   branco, ele está pronto para a aplicação se você decidir que espaços em branco são significativos.
          </TD
></TR
><TR
><TD
>&#13;           <A
HREF="function.xml-set-processing-instruction-handler.html"
><B
CLASS="function"
>xml_set_processing_instruction_handler()</B
></A
>
          </TD
><TD
>&#13;           Programadores de PHP já estariam familiarizados com instruções de 
           processo (PIs).  &#60;?php ?&#62; é uma instrução de processo,
           onde <TT
CLASS="replaceable"
><I
>php</I
></TT
> é chamada
           de o "PI target". O tratamento destes são
           application-specific, exceto que todos os PI targets iniciados
           com "XML" estão reservados.
          </TD
></TR
><TR
><TD
><A
HREF="function.xml-set-default-handler.html"
><B
CLASS="function"
>xml_set_default_handler()</B
></A
></TD
><TD
>&#13;           O que não vai para outro manipulador vai para o manipulador padrão.
		   Você conseguirá coisas como o XML e declarações do tipo de documento
		   no manipulador padrão.
          </TD
></TR
><TR
><TD
>&#13;           <A
HREF="function.xml-set-unparsed-entity-decl-handler.html"
><B
CLASS="function"
>xml_set_unparsed_entity_decl_handler()</B
></A
>
          </TD
><TD
>&#13;           Este manipulador será chamado por uma declaração de um entity não
		   analisada (NDATA).
          </TD
></TR
><TR
><TD
>&#13;           <A
HREF="function.xml-set-notation-decl-handler.html"
><B
CLASS="function"
>xml_set_notation_decl_handler()</B
></A
>
          </TD
><TD
>&#13;           Este manipulador é chamado pela declaração de uma nota.
          </TD
></TR
><TR
><TD
>&#13;           <A
HREF="function.xml-set-external-entity-ref-handler.html"
><B
CLASS="function"
>xml_set_external_entity_ref_handler()</B
></A
>
          </TD
><TD
>&#13;           Este manipulador é chamado quando o analisador XML encontra uma referência para uma entity geral analizada externamente. Isto pode ser uma referência para um arquivo ou URL, por examplo.  Veja <A
HREF="ref.xml.html#example.xml-external-entity"
>Um exemplo de entity
		   externa</A
> para uma demonstração.
          </TD
></TR
></TBODY
></TABLE
></DIV
>
     </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xml.case-folding"
>Case Folding</A
></H1
><P
>&#13;      As funções de elementos do manipulador podem conseguir os nomes dos elementos
      <I
CLASS="glossterm"
>case-folded</I
>.  Case-folding é definida pelo
      padrão XML como "um processo aplicado para uma sequência de caracateres,
      em que aqueles identificados como minúsculos são substituidos pelos seus 
      maiúsculos equivalentes". Em outras palavras, quando vai pro XML, case-folding 
      simplesmente significa mudar pra maiúsculas.
     </P
><P
>&#13;      Por definição, todos os nomes de elementos que são passados para as 
	  funções de manipulador são case-folded. Este comportamento pode ser
	  perguntado e controlado pelo analisador XML com o
      <A
HREF="function.xml-parser-get-option.html"
><B
CLASS="function"
>xml_parser_get_option()</B
></A
> e as funções
      <A
HREF="function.xml-parser-set-option.html"
><B
CLASS="function"
>xml_parser_set_option()</B
></A
>,
      respectivamente.
     </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xml.error-codes"
>Error Codes</A
></H1
><P
>&#13;      As seguintes constantes são definidas para erros no código XML
	  (conforme retornado por <A
HREF="function.xml-parse.html"
><B
CLASS="function"
>xml_parse()</B
></A
>):
      <P
></P
><TABLE
BORDER="0"
><TBODY
><TR
><TD
>XML_ERROR_NONE</TD
></TR
><TR
><TD
>XML_ERROR_NO_MEMORY</TD
></TR
><TR
><TD
>XML_ERROR_SYNTAX</TD
></TR
><TR
><TD
>XML_ERROR_NO_ELEMENTS</TD
></TR
><TR
><TD
>XML_ERROR_INVALID_TOKEN</TD
></TR
><TR
><TD
>XML_ERROR_UNCLOSED_TOKEN</TD
></TR
><TR
><TD
>XML_ERROR_PARTIAL_CHAR</TD
></TR
><TR
><TD
>XML_ERROR_TAG_MISMATCH</TD
></TR
><TR
><TD
>XML_ERROR_DUPLICATE_ATTRIBUTE</TD
></TR
><TR
><TD
>XML_ERROR_JUNK_AFTER_DOC_ELEMENT</TD
></TR
><TR
><TD
>XML_ERROR_PARAM_ENTITY_REF</TD
></TR
><TR
><TD
>XML_ERROR_UNDEFINED_ENTITY</TD
></TR
><TR
><TD
>XML_ERROR_RECURSIVE_ENTITY_REF</TD
></TR
><TR
><TD
>XML_ERROR_ASYNC_ENTITY</TD
></TR
><TR
><TD
>XML_ERROR_BAD_CHAR_REF</TD
></TR
><TR
><TD
>XML_ERROR_BINARY_ENTITY_REF</TD
></TR
><TR
><TD
>XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF</TD
></TR
><TR
><TD
>XML_ERROR_MISPLACED_XML_PI</TD
></TR
><TR
><TD
>XML_ERROR_UNKNOWN_ENCODING</TD
></TR
><TR
><TD
>XML_ERROR_INCORRECT_ENCODING</TD
></TR
><TR
><TD
>XML_ERROR_UNCLOSED_CDATA_SECTION</TD
></TR
><TR
><TD
>XML_ERROR_EXTERNAL_ENTITY_HANDLING</TD
></TR
></TBODY
></TABLE
><P
></P
>
     </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xml.encoding"
>Codificação de Caracter</A
></H1
><P
>&#13;      A Extensão XML do PHP suporta o caracter <A
HREF="http://www.unicode.org/"
TARGET="_top"
>Unicode</A
> definido por
       <I
CLASS="glossterm"
>character encoding</I
>s (codificação de caracteres)
	   diferentes. Há dois tipos de codificação de caracteres, <I
CLASS="glossterm"
>source encoding</I
> e <I
CLASS="glossterm"
> target encoding</I
>.
      A apresentação interna do PHP do documento é sempre codificada
      com <TT
CLASS="literal"
>UTF-8</TT
>.
     </P
><P
>&#13;      Source encoding é feita quando um documento XML é <A
HREF="function.xml-parse.html"
>analisado</A
>. Em <A
HREF="function.xml-parser-create.html"
> criando um analisador
	  XML</A
>, um source encoding pode ser especificado (Esta codificação 
      não poderá ser mudada após o tempo de vida do analisador XML). As
      codificações suportadas são <TT
CLASS="literal"
>ISO-8859-1</TT
>,
      <TT
CLASS="literal"
>US-ASCII</TT
> e <TT
CLASS="literal"
>UTF-8</TT
>. O segundo
      são codificações single-byte, que significa que cada caractere é
	  representado por um  byte simples.
      <TT
CLASS="literal"
>UTF-8</TT
> pode codificar caracteres compostos por
	  um número de bits variável (acima de 21) em um de seus 4 bytes. O
      source encoding padrão utilizado pelo PHP é
      <TT
CLASS="literal"
>ISO-8859-1</TT
>.
     </P
><P
>&#13;      Target encoding é feito quando o PHP passa dados para as funções
	  do analisador XML. Quando um analisador XML é criado, o target encoding
      é definido igual ao source encoding, mas este pode ser mudado em qualquer 
      ponto. O target encoding afetará dados de caracter tão bem como nome de
	  tags e processando alvos da instrução.
     </P
><P
>&#13;      Se o analisador XML encontra caracteres de fora da linha que seu
      source encoding é capaz de detalhar, ele retornará um erro.  
     </P
><P
>&#13;      Se PHP encontra caracteres no documento XML analisado que não 
	  podem ser detalhados selecionados com target encoding, os caracteres com
	  problema serão "demoted". Atualmente, isto significa que tais caracteres serão substituidos por um sinal de interrogação.
     </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="xml.examples"
>Exemplos</A
></H1
><P
>&#13;     Aqui estão alguns exemplos de scripts PHP analisando documentos XML.
    </P
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="example.xml-structure"
>Exemplo estruturado de elementos XML</A
></H2
><P
>&#13;      Este primeiro exemplo mostra a estrutura de elementos iniciais num
      documento com distanciamento da margem.
      <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN233999"
></A
><P
><B
>Exemplo 1. Mostra estrutura do elemento XML </B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br />$file </font><font color="#007700">= </font><font color="#DD0000">"data.xml"</font><font color="#007700">;<br /></font><font color="#0000BB">$depth </font><font color="#007700">= array();<br /><br />function </font><font color="#0000BB">startElement</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">, </font><font color="#0000BB">$name</font><font color="#007700">, </font><font color="#0000BB">$attrs</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;global </font><font color="#0000BB">$depth</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;for (</font><font color="#0000BB">$i </font><font color="#007700">= </font><font color="#0000BB">0</font><font color="#007700">; </font><font color="#0000BB">$i </font><font color="#007700">&lt; </font><font color="#0000BB">$depth</font><font color="#007700">[</font><font color="#0000BB">$parser</font><font color="#007700">]; </font><font color="#0000BB">$i</font><font color="#007700">++) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"&nbsp;&nbsp;"</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"$name</font><font color="#007700">\n</font><font color="#DD0000">"</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$depth</font><font color="#007700">[</font><font color="#0000BB">$parser</font><font color="#007700">]++;<br />}<br /><br />function </font><font color="#0000BB">endElement</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">, </font><font color="#0000BB">$name</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;global </font><font color="#0000BB">$depth</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$depth</font><font color="#007700">[</font><font color="#0000BB">$parser</font><font color="#007700">]--;<br />}<br /><br /></font><font color="#0000BB">$xml_parser </font><font color="#007700">= </font><font color="#0000BB">xml_parser_create</font><font color="#007700">();<br /></font><font color="#0000BB">xml_set_element_handler</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">, </font><font color="#DD0000">"startElement"</font><font color="#007700">, </font><font color="#DD0000">"endElement"</font><font color="#007700">);<br />if (!(</font><font color="#0000BB">$fp </font><font color="#007700">= </font><font color="#0000BB">fopen</font><font color="#007700">(</font><font color="#0000BB">$file</font><font color="#007700">, </font><font color="#DD0000">"r"</font><font color="#007700">))) {<br />&nbsp;&nbsp;&nbsp;&nbsp;die(</font><font color="#DD0000">"could not open XML input"</font><font color="#007700">);<br />}<br /><br />while (</font><font color="#0000BB">$data </font><font color="#007700">= </font><font color="#0000BB">fread</font><font color="#007700">(</font><font color="#0000BB">$fp</font><font color="#007700">, </font><font color="#0000BB">4096</font><font color="#007700">)) {<br />&nbsp;&nbsp;&nbsp;&nbsp;if (!</font><font color="#0000BB">xml_parse</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">, </font><font color="#0000BB">$data</font><font color="#007700">, </font><font color="#0000BB">feof</font><font color="#007700">(</font><font color="#0000BB">$fp</font><font color="#007700">))) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;die(</font><font color="#0000BB">sprintf</font><font color="#007700">(</font><font color="#DD0000">"XML error: %s at line %d"</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_error_string</font><font color="#007700">(</font><font color="#0000BB">xml_get_error_code</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">)),<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_get_current_line_number</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">)));<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /></font><font color="#0000BB">xml_parser_free</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">);<br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
     </P
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="example.xml-map-tags"
>Exemplo arrumação de Tag XML</A
></H2
><P
>&#13;      <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN234005"
></A
><P
><B
>Exemplo 2. Arrumar XML to HTML</B
></P
><P
>&#13;        Este exemplo arruma tags do documento XML diretamente para tags HTML.
         Elementos não encontrados no "array de arrumação" são ignorados. É claro,
		 este exemplo trabalhará apenas com um tipo de documento XML específico.
       </P
><P
>&#13;        <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br />$file </font><font color="#007700">= </font><font color="#DD0000">"data.xml"</font><font color="#007700">;<br /></font><font color="#0000BB">$map_array </font><font color="#007700">= array(<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#DD0000">"BOLD"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">"B"</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#DD0000">"EMPHASIS" </font><font color="#007700">=&gt; </font><font color="#DD0000">"I"</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#DD0000">"LITERAL"&nbsp;&nbsp;</font><font color="#007700">=&gt; </font><font color="#DD0000">"TT"<br /></font><font color="#007700">);<br /><br />function </font><font color="#0000BB">startElement</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">, </font><font color="#0000BB">$name</font><font color="#007700">, </font><font color="#0000BB">$attrs</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;global </font><font color="#0000BB">$map_array</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;if (</font><font color="#0000BB">$htmltag </font><font color="#007700">== </font><font color="#0000BB">$map_array</font><font color="#007700">[</font><font color="#0000BB">$name</font><font color="#007700">]) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"&lt;$htmltag&gt;"</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br />function </font><font color="#0000BB">endElement</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">, </font><font color="#0000BB">$name</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;global </font><font color="#0000BB">$map_array</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;if (</font><font color="#0000BB">$htmltag </font><font color="#007700">== </font><font color="#0000BB">$map_array</font><font color="#007700">[</font><font color="#0000BB">$name</font><font color="#007700">]) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"&lt;/$htmltag&gt;"</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br />function </font><font color="#0000BB">characterData</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">, </font><font color="#0000BB">$data</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#0000BB">$data</font><font color="#007700">;<br />}<br /><br /></font><font color="#0000BB">$xml_parser </font><font color="#007700">= </font><font color="#0000BB">xml_parser_create</font><font color="#007700">();<br /></font><font color="#FF8000">// use case-folding so we are sure to find the tag in $map_array<br /></font><font color="#0000BB">xml_parser_set_option</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">, </font><font color="#0000BB">XML_OPTION_CASE_FOLDING</font><font color="#007700">, </font><font color="#0000BB">true</font><font color="#007700">);<br /></font><font color="#0000BB">xml_set_element_handler</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">, </font><font color="#DD0000">"startElement"</font><font color="#007700">, </font><font color="#DD0000">"endElement"</font><font color="#007700">);<br /></font><font color="#0000BB">xml_set_character_data_handler</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">, </font><font color="#DD0000">"characterData"</font><font color="#007700">);<br />if (!(</font><font color="#0000BB">$fp </font><font color="#007700">= </font><font color="#0000BB">fopen</font><font color="#007700">(</font><font color="#0000BB">$file</font><font color="#007700">, </font><font color="#DD0000">"r"</font><font color="#007700">))) {<br />&nbsp;&nbsp;&nbsp;&nbsp;die(</font><font color="#DD0000">"could not open XML input"</font><font color="#007700">);<br />}<br /><br />while (</font><font color="#0000BB">$data </font><font color="#007700">= </font><font color="#0000BB">fread</font><font color="#007700">(</font><font color="#0000BB">$fp</font><font color="#007700">, </font><font color="#0000BB">4096</font><font color="#007700">)) {<br />&nbsp;&nbsp;&nbsp;&nbsp;if (!</font><font color="#0000BB">xml_parse</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">, </font><font color="#0000BB">$data</font><font color="#007700">, </font><font color="#0000BB">feof</font><font color="#007700">(</font><font color="#0000BB">$fp</font><font color="#007700">))) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;die(</font><font color="#0000BB">sprintf</font><font color="#007700">(</font><font color="#DD0000">"XML error: %s at line %d"</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_error_string</font><font color="#007700">(</font><font color="#0000BB">xml_get_error_code</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">)),<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_get_current_line_number</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">)));<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /></font><font color="#0000BB">xml_parser_free</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">);<br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
>
       </P
></DIV
></TD
></TR
></TABLE
>
     </P
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="example.xml-external-entity"
>Exemplo XML de Entity externa</A
></H2
><P
>&#13;      Este exemplo destaca o código XML. Ele ilusta como utilizar um 
	   analisador de referência a uma entity externa para incluir e 
	   analisar outros documentos, tão bem como PIs (instruções de 
	   processo) podem ser processadas, e uma forma de determinar 
       "trust" para PIs contendo códigos.
     </P
><P
>&#13;      Documentos XML que podem ser utilizados para este exemplo são encontrados 
	  abaixo do exemplo (<TT
CLASS="filename"
>xmltest.xml</TT
> e
      <TT
CLASS="filename"
>xmltest2.xml</TT
>.)
     </P
><P
>&#13;      <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN234017"
></A
><P
><B
>Exemplo 3. Exemplo de Entity externa</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br />$file </font><font color="#007700">= </font><font color="#DD0000">"xmltest.xml"</font><font color="#007700">;<br /><br />function </font><font color="#0000BB">trustedFile</font><font color="#007700">(</font><font color="#0000BB">$file</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#FF8000">// only trust local files owned by ourselves<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">if (!</font><font color="#0000BB">eregi</font><font color="#007700">(</font><font color="#DD0000">"^([a-z]+)://"</font><font color="#007700">, </font><font color="#0000BB">$file</font><font color="#007700">) <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;&amp; </font><font color="#0000BB">fileowner</font><font color="#007700">(</font><font color="#0000BB">$file</font><font color="#007700">) == </font><font color="#0000BB">getmyuid</font><font color="#007700">()) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return </font><font color="#0000BB">true</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;return </font><font color="#0000BB">false</font><font color="#007700">;<br />}<br /><br />function </font><font color="#0000BB">startElement</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">, </font><font color="#0000BB">$name</font><font color="#007700">, </font><font color="#0000BB">$attribs</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"&amp;lt;&lt;font color=</font><font color="#007700">\"</font><font color="#DD0000">#0000cc</font><font color="#007700">\"</font><font color="#DD0000">&gt;$name&lt;/font&gt;"</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;if (</font><font color="#0000BB">sizeof</font><font color="#007700">(</font><font color="#0000BB">$attribs</font><font color="#007700">)) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while (list(</font><font color="#0000BB">$k</font><font color="#007700">, </font><font color="#0000BB">$v</font><font color="#007700">) = </font><font color="#0000BB">each</font><font color="#007700">(</font><font color="#0000BB">$attribs</font><font color="#007700">)) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">" &lt;font color=</font><font color="#007700">\"</font><font color="#DD0000">#009900</font><font color="#007700">\"</font><font color="#DD0000">&gt;$k&lt;/font&gt;=</font><font color="#007700">\"</font><font color="#DD0000">&lt;font <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color=</font><font color="#007700">\"</font><font color="#DD0000">#990000</font><font color="#007700">\"</font><font color="#DD0000">&gt;$v&lt;/font&gt;</font><font color="#007700">\"</font><font color="#DD0000">"</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"&amp;gt;"</font><font color="#007700">;<br />}<br /><br />function </font><font color="#0000BB">endElement</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">, </font><font color="#0000BB">$name</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"&amp;lt;/&lt;font color=</font><font color="#007700">\"</font><font color="#DD0000">#0000cc</font><font color="#007700">\"</font><font color="#DD0000">&gt;$name&lt;/font&gt;&amp;gt;"</font><font color="#007700">;<br />}<br /><br />function </font><font color="#0000BB">characterData</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">, </font><font color="#0000BB">$data</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;echo </font><font color="#DD0000">"&lt;b&gt;$data&lt;/b&gt;"</font><font color="#007700">;<br />}<br /><br />function </font><font color="#0000BB">PIHandler</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">, </font><font color="#0000BB">$target</font><font color="#007700">, </font><font color="#0000BB">$data</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;switch (</font><font color="#0000BB">strtolower</font><font color="#007700">(</font><font color="#0000BB">$target</font><font color="#007700">)) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case </font><font color="#DD0000">"php"</font><font color="#007700">:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;global </font><font color="#0000BB">$parser_file</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#FF8000">// If the parsed document is "trusted", we say it is safe<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// to execute PHP code inside it.&nbsp;&nbsp;If not, display the code<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// instead.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">if (</font><font color="#0000BB">trustedFile</font><font color="#007700">(</font><font color="#0000BB">$parser_file</font><font color="#007700">[</font><font color="#0000BB">$parser</font><font color="#007700">])) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eval(</font><font color="#0000BB">$data</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">printf</font><font color="#007700">(</font><font color="#DD0000">"Untrusted PHP code: &lt;i&gt;%s&lt;/i&gt;"</font><font color="#007700">, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">htmlspecialchars</font><font color="#007700">(</font><font color="#0000BB">$data</font><font color="#007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br />function </font><font color="#0000BB">defaultHandler</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">, </font><font color="#0000BB">$data</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;if (</font><font color="#0000BB">substr</font><font color="#007700">(</font><font color="#0000BB">$data</font><font color="#007700">, </font><font color="#0000BB">0</font><font color="#007700">, </font><font color="#0000BB">1</font><font color="#007700">) == </font><font color="#DD0000">"&amp;" </font><font color="#007700">&amp;&amp; </font><font color="#0000BB">substr</font><font color="#007700">(</font><font color="#0000BB">$data</font><font color="#007700">, -</font><font color="#0000BB">1</font><font color="#007700">, </font><font color="#0000BB">1</font><font color="#007700">) == </font><font color="#DD0000">";"</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">printf</font><font color="#007700">(</font><font color="#DD0000">'&lt;font color="#aa00aa"&gt;%s&lt;/font&gt;'</font><font color="#007700">, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">htmlspecialchars</font><font color="#007700">(</font><font color="#0000BB">$data</font><font color="#007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">printf</font><font color="#007700">(</font><font color="#DD0000">'&lt;font size="-1"&gt;%s&lt;/font&gt;'</font><font color="#007700">, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">htmlspecialchars</font><font color="#007700">(</font><font color="#0000BB">$data</font><font color="#007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br />function </font><font color="#0000BB">externalEntityRefHandler</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">, </font><font color="#0000BB">$openEntityNames</font><font color="#007700">, </font><font color="#0000BB">$base</font><font color="#007700">, </font><font color="#0000BB">$systemId</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$publicId</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;if (</font><font color="#0000BB">$systemId</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!list(</font><font color="#0000BB">$parser</font><font color="#007700">, </font><font color="#0000BB">$fp</font><font color="#007700">) = </font><font color="#0000BB">new_xml_parser</font><font color="#007700">(</font><font color="#0000BB">$systemId</font><font color="#007700">)) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">printf</font><font color="#007700">(</font><font color="#DD0000">"Could not open entity %s at %s\n"</font><font color="#007700">, </font><font color="#0000BB">$openEntityNames</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$systemId</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return </font><font color="#0000BB">false</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while (</font><font color="#0000BB">$data </font><font color="#007700">= </font><font color="#0000BB">fread</font><font color="#007700">(</font><font color="#0000BB">$fp</font><font color="#007700">, </font><font color="#0000BB">4096</font><font color="#007700">)) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!</font><font color="#0000BB">xml_parse</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">, </font><font color="#0000BB">$data</font><font color="#007700">, </font><font color="#0000BB">feof</font><font color="#007700">(</font><font color="#0000BB">$fp</font><font color="#007700">))) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">printf</font><font color="#007700">(</font><font color="#DD0000">"XML error: %s at line %d while parsing entity %s\n"</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_error_string</font><font color="#007700">(</font><font color="#0000BB">xml_get_error_code</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">)),<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_get_current_line_number</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">), </font><font color="#0000BB">$openEntityNames</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_parser_free</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return </font><font color="#0000BB">false</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_parser_free</font><font color="#007700">(</font><font color="#0000BB">$parser</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return </font><font color="#0000BB">true</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;return </font><font color="#0000BB">false</font><font color="#007700">;<br />}<br /><br />function </font><font color="#0000BB">new_xml_parser</font><font color="#007700">(</font><font color="#0000BB">$file</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;global </font><font color="#0000BB">$parser_file</font><font color="#007700">;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$xml_parser </font><font color="#007700">= </font><font color="#0000BB">xml_parser_create</font><font color="#007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_parser_set_option</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">, </font><font color="#0000BB">XML_OPTION_CASE_FOLDING</font><font color="#007700">, </font><font color="#0000BB">1</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_set_element_handler</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">, </font><font color="#DD0000">"startElement"</font><font color="#007700">, </font><font color="#DD0000">"endElement"</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_set_character_data_handler</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">, </font><font color="#DD0000">"characterData"</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_set_processing_instruction_handler</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">, </font><font color="#DD0000">"PIHandler"</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_set_default_handler</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">, </font><font color="#DD0000">"defaultHandler"</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_set_external_entity_ref_handler</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">, </font><font color="#DD0000">"externalEntityRefHandler"</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;if (!(</font><font color="#0000BB">$fp </font><font color="#007700">= @</font><font color="#0000BB">fopen</font><font color="#007700">(</font><font color="#0000BB">$file</font><font color="#007700">, </font><font color="#DD0000">"r"</font><font color="#007700">))) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return </font><font color="#0000BB">false</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;if (!</font><font color="#0000BB">is_array</font><font color="#007700">(</font><font color="#0000BB">$parser_file</font><font color="#007700">)) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">settype</font><font color="#007700">(</font><font color="#0000BB">$parser_file</font><font color="#007700">, </font><font color="#DD0000">"array"</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$parser_file</font><font color="#007700">[</font><font color="#0000BB">$xml_parser</font><font color="#007700">] = </font><font color="#0000BB">$file</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;return array(</font><font color="#0000BB">$xml_parser</font><font color="#007700">, </font><font color="#0000BB">$fp</font><font color="#007700">);<br />}<br /><br />if (!(list(</font><font color="#0000BB">$xml_parser</font><font color="#007700">, </font><font color="#0000BB">$fp</font><font color="#007700">) = </font><font color="#0000BB">new_xml_parser</font><font color="#007700">(</font><font color="#0000BB">$file</font><font color="#007700">))) {<br />&nbsp;&nbsp;&nbsp;&nbsp;die(</font><font color="#DD0000">"could not open XML input"</font><font color="#007700">);<br />}<br /><br />echo </font><font color="#DD0000">"&lt;pre&gt;"</font><font color="#007700">;<br />while (</font><font color="#0000BB">$data </font><font color="#007700">= </font><font color="#0000BB">fread</font><font color="#007700">(</font><font color="#0000BB">$fp</font><font color="#007700">, </font><font color="#0000BB">4096</font><font color="#007700">)) {<br />&nbsp;&nbsp;&nbsp;&nbsp;if (!</font><font color="#0000BB">xml_parse</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">, </font><font color="#0000BB">$data</font><font color="#007700">, </font><font color="#0000BB">feof</font><font color="#007700">(</font><font color="#0000BB">$fp</font><font color="#007700">))) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;die(</font><font color="#0000BB">sprintf</font><font color="#007700">(</font><font color="#DD0000">"XML error: %s at line %d\n"</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_error_string</font><font color="#007700">(</font><font color="#0000BB">xml_get_error_code</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">)),<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">xml_get_current_line_number</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">)));<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br />echo </font><font color="#DD0000">"&lt;/pre&gt;"</font><font color="#007700">;<br />echo </font><font color="#DD0000">"parse complete\n"</font><font color="#007700">;<br /></font><font color="#0000BB">xml_parser_free</font><font color="#007700">(</font><font color="#0000BB">$xml_parser</font><font color="#007700">);<br /><br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
     </P
><P
>&#13;      <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN234021"
></A
><P
><B
>Exemplo 4. xmltest.xml</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="xml"
>&#60;?xml version='1.0'?&#62;
&#60;!DOCTYPE chapter SYSTEM "/just/a/test.dtd" [
&#60;!ENTITY plainEntity "FOO entity"&#62;
&#60;!ENTITY systemEntity SYSTEM "xmltest2.xml"&#62;
]&#62;
&#60;chapter&#62;
 &#60;TITLE&#62;Título &#38;plainEntity;&#60;/TITLE&#62;
 &#60;para&#62;
  &#60;informaltable&#62;
   &#60;tgroup cols="3"&#62;
    &#60;tbody&#62;
     &#60;row&#62;&#60;entry&#62;a1&#60;/entry&#62;&#60;entry morerows="1"&#62;b1&#60;/entry&#62;&#60;entry&#62;c1&#60;/entry&#62;&#60;/row&#62;
     &#60;row&#62;&#60;entry&#62;a2&#60;/entry&#62;&#60;entry&#62;c2&#60;/entry&#62;&#60;/row&#62;
     &#60;row&#62;&#60;entry&#62;a3&#60;/entry&#62;&#60;entry&#62;b3&#60;/entry&#62;&#60;entry&#62;c3&#60;/entry&#62;&#60;/row&#62;
    &#60;/tbody&#62;
   &#60;/tgroup&#62;
  &#60;/informaltable&#62;
 &#60;/para&#62;
 &#38;systemEntity;
 &#60;section id="about"&#62;
  &#60;title&#62;Sobre este documento&#60;/title&#62;
  &#60;para&#62;
   &#60;!-- this is a comment --&#62;
   &#60;?php echo 'Hi!  This is PHP version '.phpversion(); ?&#62;
  &#60;/para&#62;
 &#60;/section&#62;
&#60;/chapter&#62;</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
     </P
><P
>&#13;      Este arquivo está incluido de <TT
CLASS="filename"
>xmltest.xml</TT
>:
      <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN234026"
></A
><P
><B
>Exemplo 5. xmltest2.xml</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="xml"
>&#60;?xml version="1.0"?&#62;
&#60;!DOCTYPE foo [
&#60;!ENTITY testEnt "test entity"&#62;
]&#62;
&#60;foo&#62;
   &#60;element attrib="value"/&#62;
   &#38;testEnt;
   &#60;?php print "This is some more PHP code being executed."; ?&#62;
&#60;/foo&#62;</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
     </P
></DIV
></DIV
></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>Índice</B
></DT
><DT
><A
HREF="function.utf8-decode.html"
>utf8_decode</A
>&nbsp;--&nbsp;
     Converte uma string com caracteres ISO-8859-1 codificadas com UTF-8
     para single-byte ISO-8859-1.
    </DT
><DT
><A
HREF="function.utf8-encode.html"
>utf8_encode</A
>&nbsp;--&nbsp;Codifica um string ISO-8859-1 para UTF-8</DT
><DT
><A
HREF="function.xml-error-string.html"
>xml_error_string</A
>&nbsp;--&nbsp;Obtém uma string de erro do analisador XML</DT
><DT
><A
HREF="function.xml-get-current-byte-index.html"
>xml_get_current_byte_index</A
>&nbsp;--&nbsp;Obtém o índice do byte atual para um analisador 
	XML </DT
><DT
><A
HREF="function.xml-get-current-column-number.html"
>xml_get_current_column_number</A
>&nbsp;--&nbsp;
     Obtém o número da coluna atual para um analisador
	 XML </DT
><DT
><A
HREF="function.xml-get-current-line-number.html"
>xml_get_current_line_number</A
>&nbsp;--&nbsp;Obtém o número da linha para um analisador XML</DT
><DT
><A
HREF="function.xml-get-error-code.html"
>xml_get_error_code</A
>&nbsp;--&nbsp;Obtém um código de erro do analisador XML</DT
><DT
><A
HREF="function.xml-parse-into-struct.html"
>xml_parse_into_struct</A
>&nbsp;--&nbsp;Analisa dados XML dentro de uma estrutura de 
	array </DT
><DT
><A
HREF="function.xml-parse.html"
>xml_parse</A
>&nbsp;--&nbsp;Inicia a análise em um documento XML</DT
><DT
><A
HREF="function.xml-parser-create-ns.html"
>xml_parser_create_ns</A
>&nbsp;--&nbsp;
     Cria um analisador XML com suporte a namespace (uma estrutura do XML)
    </DT
><DT
><A
HREF="function.xml-parser-create.html"
>xml_parser_create</A
>&nbsp;--&nbsp;cria um analisador XML</DT
><DT
><A
HREF="function.xml-parser-free.html"
>xml_parser_free</A
>&nbsp;--&nbsp;Free an XML parser</DT
><DT
><A
HREF="function.xml-parser-get-option.html"
>xml_parser_get_option</A
>&nbsp;--&nbsp;Get options from an XML parser</DT
><DT
><A
HREF="function.xml-parser-set-option.html"
>xml_parser_set_option</A
>&nbsp;--&nbsp;Set options in an XML parser</DT
><DT
><A
HREF="function.xml-set-character-data-handler.html"
>xml_set_character_data_handler</A
>&nbsp;--&nbsp;Set up character data handler</DT
><DT
><A
HREF="function.xml-set-default-handler.html"
>xml_set_default_handler</A
>&nbsp;--&nbsp;Set up default handler</DT
><DT
><A
HREF="function.xml-set-element-handler.html"
>xml_set_element_handler</A
>&nbsp;--&nbsp;Set up start and end element handlers</DT
><DT
><A
HREF="function.xml-set-end-namespace-decl-handler.html"
>xml_set_end_namespace_decl_handler</A
>&nbsp;--&nbsp;Set up end namespace declaration handler</DT
><DT
><A
HREF="function.xml-set-external-entity-ref-handler.html"
>xml_set_external_entity_ref_handler</A
>&nbsp;--&nbsp;Set up external entity reference handler</DT
><DT
><A
HREF="function.xml-set-notation-decl-handler.html"
>xml_set_notation_decl_handler</A
>&nbsp;--&nbsp;Set up notation declaration handler</DT
><DT
><A
HREF="function.xml-set-object.html"
>xml_set_object</A
>&nbsp;--&nbsp;Use XML Parser within an object</DT
><DT
><A
HREF="function.xml-set-processing-instruction-handler.html"
>xml_set_processing_instruction_handler</A
>&nbsp;--&nbsp;
   Set up processing instruction (PI) handler
  </DT
><DT
><A
HREF="function.xml-set-start-namespace-decl-handler.html"
>xml_set_start_namespace_decl_handler</A
>&nbsp;--&nbsp;
   Set up start namespace declaration handler
  </DT
><DT
><A
HREF="function.xml-set-unparsed-entity-decl-handler.html"
>xml_set_unparsed_entity_decl_handler</A
>&nbsp;--&nbsp;
   Set up unparsed entity declaration handler
  </DT
></DL
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.xdiff-string-patch.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Principal</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.utf8-decode.html"
ACCESSKEY="N"
>Próxima</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>xdiff_string_patch</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="funcref.html"
ACCESSKEY="U"
>Acima</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>utf8_decode</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>