Hi Tracy,

   Ofcourse it may be flex 1.x/as2 ... have u any idea about the 
methods that used in  this class. I modified this line of code 

         xml.appendChild(xml.createElement(nodeName));

   as   var xml1:XMLDocument=new XMLDocument();
        xml.appendChild(xml1.createElement(nodeName));

  becaz I found createElement() method in XMLDocument class. When I 
tried to display xml in jsp its displaying nothing.

  Have u any idea of this.Hope soon reply from ur side. Becaz I am 
lot of trouble.

Thanks & Regards,
Siva Kumar.


--- In [email protected], "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> I am pretty sure that is the Flex 1.x / AS2 utility.
> 
> Tracy
> 
> ________________________________
> 
> From: [email protected] 
[mailto:[EMAIL PROTECTED] On
> Behalf Of siva.flex
> Sent: Tuesday, August 28, 2007 1:13 AM
> To: [email protected]
> Subject: [flexcoders] Re: converting mxml data to xml code
> 
>  
> 
> Hi Dan,
> 
> yes it's not working. If u see the documentation of xml u find 
> that createElement() method doesn't exist. And I downloaded the 
> folder and deployed , I tried to access the application, I found 
lot 
> of warnings and errors.
> 
> Has it worked for u. Could u suggest me to solve this issue. Have 
> I done any mistake.
> 
> Thanks & Regards,
> Siva Kumar
> 
> --- In [email protected] <mailto:flexcoders%
40yahoogroups.com>
> , "Daniel Freiman" <FreimanCQ@> 
> wrote:
> >
> > Not working how?
> > 
> > - Dan
> > 
> > On 8/27/07, siva.flex <siva.flex@> wrote:
> > >
> > > Hi All,
> > >
> > > Anydody have the code to convert mxml data to .xml file. I have
> > > found this code in net.
> > >
> > > class XMLUtil {
> > >
> > > static function as2xml(obj: Object, nodeName: String) {
> > > var xml:XML=new XML();
> > > xml.appendChild(xml.createElement(nodeName));
> > > for (var i in obj) {
> > > handleItem(xml, obj[i], i);
> > > }
> > > return xml;
> > > }
> > >
> > > private static function handleItem(xml, item, nodeName: String) 
{
> > > var type=typeof item;
> > > if (type=="string" || type=="number" || item instanceof Date)
> > > {
> > > var el=xml.createElement(nodeName);
> > > el.appendChild(xml.createTextNode(item));
> > > xml.firstChild.appendChild(el);
> > > } else if (item instanceof Array) {
> > > for(var i=0; i<item.length; i++)
> > > handleItem(xml, item[i], nodeName);
> > > } else if (item instanceof Object)
> > > xml.firstChild.appendChild(as2xml(item, nodeName));
> > > }
> > >
> > > }
> > >
> > > But its not working. I created relevant as files. Anybody have
> > > the code to convert to mxml data to xml like above.
> > >
> > > Thanks & Regards,
> > > Siva Kumar
> > >
> > > 
> > >
> >
>


Reply via email to