Foros del Web » Soporte técnico » Ayuda General »

Duda xml

Estas en el tema de Duda xml en el foro de Ayuda General en Foros del Web. Estoy leyendo la referencia de XML y tengo unas dudillas, haber si me pueden ayudar. La referencia me dice que no puedo usar delimitadores-iniciales y ...
  #1 (permalink)  
Antiguo 11/06/2012, 15:13
Avatar de hackjose  
Fecha de Ingreso: abril-2010
Ubicación: Edo Mexico
Mensajes: 1.178
Antigüedad: 14 años
Puntos: 131
Duda xml

Estoy leyendo la referencia de XML y tengo unas dudillas, haber si me pueden ayudar.

La referencia me dice que no puedo usar delimitadores-iniciales y los ]]> como texto simple

ejemplo

Código XML:
Ver original
  1. <elemento>&</elemento>
  2.  
  3. <elemento>]]></elemento>

La referencia dice que es incorrecto y me queda claro


Tambien dice que no puedo poner esto

Código XML:
Ver original
  1. <![CDATA[ textotexto ]]> textotexto ]]>

y me queda claro

Pero hay una parte que no le entiendo

The ampersand character (&) and the left angle bracket (<) must not appear in their literal form, except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. If they are needed elsewhere, they must be escaped using either numeric character references or the strings " &amp; " and " &lt; " respectively. The right angle bracket (>) may be represented using the string " &gt; ", and must, for compatibility, be escaped using either " &gt; " or a character reference when it appears in the string " ]]> " in content, when that string is not marking the end of a CDATA section.

Alguien me aria el favor de decirme que dice, mas que nada esta parte

The right angle bracket (>) may be represented using the string " &gt; ", and must, for compatibility, be escaped using either " &gt; " or a character reference when it appears in the string " ]]> " in content, when that string is not marking the end of a CDATA section.

es valido

<elemento> texto > texto </elemento>

<elemento> texto ]]> texto </elemento>

Supongo que no son validos, ya que si el parser xml ve > o esto ]]> espera que haya un inicio, pero en fin solo lo supongo.

suponiendo que esta mal lo anterior, esta seria la solucion?

<elemento> texto ]]&gt; </elemento>

Espero me puedan ayudar, o denme un link

Saludos

Etiquetas: xml
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:09.