E4X : How to get elements that contain a string pattern in the node name?

Is there a way to extract children from an XMLList where the node name of a child contains a string pattern?
For example :
<record>
     <XblahX/>
     <cow/>
     <YblahY/>
</record>
How to get the elements of record that have a node name that contains the string "blah"?

var rec:XML = <record>
     <XblahX/>
     <cow/>
     <YblahY/>
</record>;
var r:RegExp = /blah/;
var elems:XMLList = rec.children().(localName().search(r)>-1);
trace(elems.toXMLString())

Similar Messages

  • JAX-WS: How to get SoapMessage that contains SoapFault ?

    Hello all
    I am using JAX-WS to invoke a web service. (Say for example: [http://weblogs.java.net/blog/jitu/archive/2006/01/accessing_googl_1.html] )
    Now, if I get a SOAPFault ( means when WebServiceException gets thrown) I want to print the corresponding SoapMessage.
    E.g. I want to print something like
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <soap:Fault>
    <faultcode>soap:Server</faultcode>
    <faultstring>Server was unable to process request.</faultstring>
    <detail>
    <error>
    <code>0x80041102</code>
    <description>The specified entity was not found.</description>
    <type>Platform</type>
    </error>
    </detail>
    </soap:Fault>
    </soap:Body>
    </soap:Envelope>
    Can someone please help me out in this regards?
    Thanks in advance.
    ~pp

    sample code to invoke above method
    private String callWS(WSServiceConfig serviceConfig, String soapRequest)
             throws SOAPException, IOException
         try
             String wsdl = serviceConfig.getUrl();
             URL url = new URL(wsdl);
             QName serviceName = new QName(serviceConfig.getNamespaceUri(),
                  serviceConfig.getServiceName());
             QName portName = new QName(serviceConfig.getNamespaceUri(),
                  serviceConfig.getPortName());
             Service service = Service.create(url, serviceName);
             Dispatch dispatch = service.createDispatch(portName,
                  SOAPMessage.class, Service.Mode.MESSAGE);
             if (serviceConfig.getSoapActionUri() != null)
              dispatch.getRequestContext().put(
                   Dispatch.SOAPACTION_URI_PROPERTY,
                   serviceConfig.getSoapActionUri().trim());
             MessageFactory mf = MessageFactory.newInstance();
             SOAPMessage req = mf.createMessage(null, IOUtil
                  .getBufferedInputStream(soapRequest.getBytes()));
             SOAPMessage res = (SOAPMessage) dispatch.invoke(req);
             ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
             res.writeTo(byteArrayOutputStream);
             return IOUtil.getString(byteArrayOutputStream);
         catch (WebServiceException we)
             logger.error("failed to invoke ws -- " + we.getMessage(), we);
             if (we instanceof SOAPFaultException)
              // return soap fault
              return returnSoapFault((SOAPFaultException) we);
             throw we;
        }

  • How to create a element that contain a element generated in another document

    Hi,anybody.
    I want to create a element that contained a element generated in another document.The following is my coding:
    doc1 = new XMLDocument();
    ele1 = (XMLElement)doc1.createElement("AAA");
    doc2 = new XMLDocument();
    ele2 = (XMLElement)doc2.createElement("BBB");
    ele2.appendChild(doc2.createTextNode("bbb"));
    XMLNode ele = (XMLNode)ele2.cloneNode(true);
    ele1.appendChild(ele);
    but there is a DOMException,Node doesn't belong to the current document.
    Thanks in advance.
    null

    Hi Marc,
    it is currently not possible to check for values in other tables within different repositories (main tables).
    If you want to check for values in flat lookup tables, use the "Fields" menu in the expression editor. You will get sth like this:
    IS_NULL(Category.Item)
    whereas "Category" could be a lookup table (flat, hierarchy, taxonomy) and "Item" a field in it.
    Checking across qualified lookup tables is only possible in a very restricted manner.
    Hope that helps.
    Christian

  • Photoshop elements 10 will not migrate to my new macbook pro/retina display.  There is no CD/DVD player on this machine.  Any suggestions on how to get Elements onto my machine?  Yes, I have the disk(s).

    Photoshop elements 10 will not migrate to my new macbook pro/retina display.  There is no CD/DVD player on this machine.  Any suggestions on how to get Elements onto my machine?  Yes, I have the disk(s).  Am I going to have to buy an external CD/DVD player to load this one program:(

    I have ordered a USB3 BluRay/DVD/CD player/burner and will use that both with my iMac ( in which the Superdrive seems to be failing ) and the MBPro Retina I just bought .

  • I am trying to set up my apple tv on a sony KDL - 40xbr4. The remote is a sony RM-V302. I plugged it into the HDMI IN on the side of the TV but cannot find out how to get to that input. I am at a winter rental property and brought my Apple TV with me.

    I am trying to set up my apple tv on a sony KDL - 40xbr4. The remote is a sony RM-V302. I plugged it into the HDMI IN on the side of the TV but cannot find out how to get to that input. I am at a winter rental property and brought my Apple TV with me. I did check internet for solutions. The instructions I found said to use a "home button" on the remote.  There isn't one. I sure would appreciate help if someone knows a solution.  My first post - hope I did this right.

    if its anything like my Sony, theres a button top left corner that upon each press i get an audible bleep and the AV inputs come up on screen, i then cycle down to whichever input i wish to select!
    in case your remote is different, the button on my remote has a square with a slightly smaller square just overlapping the first square.
    hope that helps?
    rgds Lee.

  • So, I made my account a while ago before I had an iPhone so I can get music. The result of that I can't remember my security questions, and it tells me to send a rescue email an alert, but it doesn't show you how to get to that page. Can someone help me?

    So, I made my account a while ago before I had an iPhone so I can get music. The result of that I can't remember my security questions, and it tells me to send a rescue email an alert, but it doesn't show you how to get to that page. I am getting quite annoyed because apples hours arent the best fitted to my scedule since I have school and work, so I cant call and ask how to get fixed. Please help me all I want to do is buy some music...

    Click here and fill out the form.
    (90729)

  • I disabled my iPhone 4 and while doing a restore via iTunes,  it is downloading and timing out so the download is not completing. any idea how to get past that?  I have tried many times and the same error keeps happening.

    I disabled my iPhone 4 and while doing a restore via iTunes,  it is downloading and timing out so the download is not completing. any idea how to get past that?  I have tried many times and the same error keeps happening.

    You need to force the phone into recovery mode, as described here, & restore it:
    http://support.apple.com/kb/ht1808
    Sorry, you've already lost all data on your phone.

  • How to get alert that Tenant's VM is up?

    hi guys... how to get alert that tenant vm is up?

    Hi Weili,
    >>it will call the script function to run the measuring vm usage.
    Could you please detail "measuring vm usage" ?
    I mean which usage will be measured .
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to get last Build date of a dll in the real time target

    Info On My Project    
       I am working on LabWindows CVI 12.0 for development . This project is a real time application for hardware, which is having Phar Lap ETS as RTOS...  
    I am facing some problems while checking Build date of my Application file( .dll)
    I have tried to use GetFileDate API. But it is not supporting for realtime Target..
    So i have tried __DATE__ macro.. That also having some problems..
    How to get last Build date of a dll from the real time target  ??
    Please Help to solve this....
    Thanks
    Vaishakh A  K

    Please reply if any one have suggestion...

  • I have lost sound on my iPad in apps unless I use headphones ,does anyone know how to get sound back without them .I have used the mute volume on the bar at bottom of screen and the slider volume control there only shows when headphones are plugged in !

    I have lost sound on my iPad in apps unless I use headphones ,does anyone know how to get sound back without them .I have used the mute volume on the bar at bottom of screen and the slider volume control there only shows when headphones are plugged in !
    I also tried resetting settings all to no avail ...I looked up some advice and watched utube video advice on how to fix without success..
    The volume control button on side does not work ,I got the iPad last August and wonder if it is a fault that means I must return it for replacement from where it was purchased ?

    The Retrospect you used way back when is no longer around. The company was sold and that company produced a new version of Retrospect - Retrospect 8.x
    So, as you've been told, you would have to be running a Tiger system with an old version of Retrospect software (5.x or 6.x - you would need to know) assuming you can find the software.
    As best I can remember you cannot extract files from a Retrospect backup except using the software since Retrospect did not normally make a file by file backup rather it created an archive of the files in the backup. I'm assuming that the EMC/Retrospect people have told you that old Retrospect backups are not accessible by Retrospect 8.x?

  • How we will know that dimension size is more than the fact table size?

    how we will know that dimension size is more than the fact table size?

    Hi,
    Let us assume that we are going to take Division and distribution channel in a dimension and assume we have 20 distinct values for Division in R/3 and 30 Distinct values for Distribution channel .So Maximum, we can get 20 * 30 records in dimension table and we can take rough estimation of records in the cube by observing the raw data in source system.
    With rgds,
    Anil Kumar Sharma .P

  • I have itune on my first computer, but i cant download it for my other one,how can i do that, i tryed many time with the link it says you download it but nothing follows  thank you

    I have itune on my first computer, but i cant download it for my other one, how can i do that, i tryed many time with the link it says you download it but nothing follows  thank you

    I'd first try downloading an installer from the Apple website using a different web browser:
    http://www.apple.com/itunes/download/
    If you use Firefox instead of IE for the download (or vice versa), do you get a working installer?

  • Does anyone know how to get a preflight file signed by apple for the 21 mac

    does anyone know how to get a preflight file signed by apple for the 21 mac

    im trying to get a hold of them to see if they can deauthorize a computer. I am unable to do it because i can't get the internet to hook up. And i got a new laptop that i get the internet on but i can't authorize it unless i deauthorize the other one. i've called apple 3 times and theyve not been very helpful saying i need to get  hold of itunes.

  • How can i autoforward that mail from SAP INBOX to the outlook

    Hi ,
    My Requirement is that,
    I have to send an email to outlook, whenever PO Created in SRM System
    I have created  custom workflow, i have added a sendmailtask step, i given the SAP userid to send SAP Mail to the user.
    It is sending SAP Mail to the User to his inbox perfectly.
    Now, how can i autoforward that mail from SAP INBOX to the outlook. This is has to work for all users.
    Please give some suggestions. ot it can be achived any other way.
    Note: This is Email Message not a workitem.
    I have doubt that RSWW program will work only for workitems.*
    Thanks & Regards,
    Suresh.

    Hi ST,
    what I understand from your requirement is that you are able to send messages using SendMail Step to SAP Inbox and now you want it to be sent to users Outlook.
    Here you need to create a container which would store users email address of Outlook (which would be stored in SU01 or in a ztable), use this container in your Send Mail step and in the Recepient Type as email.
    Hope it helps.
    Aditya

  • How can I prevent that emails are downloaded (POP3) when the lid of my MacBook Pro is closed?

    How can I prevent that emails are downloaded (POP3) when the lid of my MacBook Pro is closed?

    Disable Power Nap in the Energy Saver pane of System Preferences. Uncheck the box marked Enable Power Nap... in each of the tabs.

Maybe you are looking for