Comunidad de diseño web y desarrollo en internet online

ayuda con agregar nodo xml en flex air

Citar            
MensajeEscrito el 02 Ago 2009 03:41 pm
hola amigos vengo con un problemilla tengo el siguiente xml

Código XML :

<mesas_hombres>
  <mesa id="1">
    <nombre>Mesa_1</nombre>
    <recinto>fsdg</recinto>
    <hr_ini>10</hr_ini>
    <hr_fin>20</hr_fin>
    <voto id="Nulos">
      <cantidad>0</cantidad>
    </voto>
    <voto id="Blancos">
      <cantidad>0</cantidad>
    </voto>
    <voto id="bcv">
      <cantidad>0</cantidad>
    </voto>
  </mesa>
  <mesa id="2">
    <nombre>Mesa_2</nombre>
    <recinto>gfhfgh</recinto>
    <hr_ini>10</hr_ini>
    <hr_fin>20</hr_fin>
    <voto id="Nulos">
      <cantidad>10</cantidad>
    </voto>
    <voto id="Blancos">
      <cantidad>20</cantidad>
    </voto>
    <voto id="bcv">
      <cantidad>10</cantidad>
    </voto>
    <voto id="wwww">
      <cantidad>0</cantidad>
    </voto>
  </mesa>
</mesas_hombres>


y bueno y este lo tengo en la siguiente variable

xml_mesas_hombres

bueno lo q necesito es a la mesa con id 1 agregarle dentro de ella un nodo de este estilo

Código XML :

 <voto id="algo">
      <cantidad>0</cantidad>
    </voto>


mi problema q no se como hacer eso intente lo siguiente pero no me funciona

Código ActionScript :

var tem1:XML=
               <voto id="algo">
               <cantidad>
               0
               </cantidad>
               </voto>;
               xml_mesas_hombres.mesa[1]appendChild(tem1);


alguien me podria ayudar con esto pliss

Por anikilatorbeta

42 de clabLevel



 

msie8
Citar            
MensajeEscrito el 02 Ago 2009 03:57 pm
emmm olvidenlo esta bien lo q estaba haciendo es un error capa 8 jejje tenia problema con index del nodo
saludos a todos

Por anikilatorbeta

42 de clabLevel



 

msie8
Citar            
MensajeEscrito el 22 Feb 2012 05:17 pm
era el index 0?? o algo asi?

Por Pepitweet

20 de clabLevel



Genero:Masculino  

Programador novato

chrome
Citar            
MensajeEscrito el 22 Feb 2012 05:50 pm
ya ni me recuerdo de hace demasiado tiempo hice esta pregunta

Por anikilatorbeta

42 de clabLevel



 

chrome
Citar            
MensajeEscrito el 22 Feb 2012 05:55 pm
XD!! yo tengo el mismo problema, pero bueno con lo que tienes me trataré de guiar..

Por Pepitweet

20 de clabLevel



Genero:Masculino  

Programador novato

chrome
Citar            
MensajeEscrito el 22 Feb 2012 05:56 pm
dejame revisar el proyecto lo tengo archivado y te digo como lo corregi

Por anikilatorbeta

42 de clabLevel



 

chrome
Citar            
MensajeEscrito el 22 Feb 2012 05:59 pm
si era eso era que comenzaba desde cero

Por anikilatorbeta

42 de clabLevel



 

chrome

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.