Hi Alex,

There are two cases, one of them is my project the other is related with Http services :

1.
I my case,  two transformation classes used for to/from xml with flex view.

/https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/JobXmlToView.a//s//
//https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/ViewToJobXml.as/

And i am not sure but there are some code pieces using xpath kind of controls/searches in source base AFAIR.

Having all xml functionality in Royale will be nice of course but if you think that  it is better to use e4x for all my code base  i may think on that.

2.
Currently i am working on HTTPMultiService because as we discussed previously to create fiber HTTPServiceWrapper class and extend it from *mx.rpc.http.HTTPMultiService *

There are two classes :
*
mx.rpc.http.HTTPMultiService * and *mx.rpc.http.mxml.**HTTPMultiService* and extends from *mx.rpc.http.HTTPMultiService

***mx.rpc.http.HTTPMultiService **has referance for class *AbstractOperation. *This class has emulation for package *mx.rpc* but not for *mx.rpc.http *which has references flash.xml.XMLDocument, flash.xml.XMLNode and mx.rpc.xml.SimpleXMLDecoder, mx.rpc.xml.SimpleXMLEncoder.***

*When i am  emulating **mx.rpc.http.*AbstractOperation *i needed to emulate all XML thing.*

*If it is possible to use e4x for these classes also i may do it. I have to check all my emulation classes to remember the work i have done yesterday :) It is getting harder to recover as life goes.

Thanks
Serkan

16.10.2018 20:24 tarihinde Alex Harui yazdı:

Hi Serkan,

After looking at the XMLDocument/XMLNode API, it might be a manageable amount of work to map it to e4x.

On the other hand, if your response from the server is a string in XML format, you can create an e4x XML object by doing:

    Var xml:XML = new XML(stringFromServer);

It will parse the string in the constructor.

Then instead of accessing a childNodes array, you get an XMLList that has an array-like API by calling:

    Var xmlChildren:XMLList = xml.children();

Then instead of an XMLNode you get an XML node:

    Var xmlChildNode:XML = xmlChildren[i];

HTH,

-Alex

*From: *Serkan Taş <[email protected]>
*Reply-To: *"[email protected]" <[email protected]>
*Date: *Tuesday, October 16, 2018 at 10:15 AM
*To: *"[email protected]" <[email protected]>
*Subject: *Re: Work on Emulation

I am using xml for communicating with a Java application over http (POST/GET) with rest way.  Send/Receive xml.

I need to replace this messsaging infrastructure with a lightweight approach but not now.

Reproducing all XML staff may need too much time for sure and i am not sure how to go with XML/XMLList and e4x how much time it may take.

Let me go step by step, discuss and see what can i do.

Serkan.

16.10.2018 19:58 tarihinde Alex Harui yazdı:

    I suppose you could try to reproduce XMLDocument.  The only reason
    it doesn’t exist is because nobody has needed it so far, but
    creating that could be a lot of work.  Is there a reason you don’t
    want to use XML/XMLList and e4x?  Does your app decode SOAP
    responses or are you using SimpleXMLDecoder/Encoder for some other
    network/server communication?

    -Alex

    *From: *Serkan Taş <[email protected]>
    <mailto:[email protected]>
    *Reply-To: *"[email protected]"
    <mailto:[email protected]> <[email protected]>
    <mailto:[email protected]>
    *Date: *Tuesday, October 16, 2018 at 9:40 AM
    *To: *"[email protected]" <mailto:[email protected]>
    <[email protected]> <mailto:[email protected]>
    *Subject: *Work on Emulation

    Hi,

    When i have to use xml classes like SimpleXMLDecoder,
    SimpleXMLEncoder, etc. I need some class implentations like
    XMLNode, XMLType,XMLDocument. I created the emulations of Encode
    and Decoder and  created classes XMLNode, XMLType,XMLDocument with
    empty methods and some variables.

    What will be the Royale approach for XML operations or will there be ?

    Thanks
    Serkan





Reply via email to