Access XML attributes

How can I access XML attributes in LiveCycle using JavaScript and XPath.
I've tried using:
mynodesFormData.item(i).Name.attributes.getNamedItem("someattr");
Thanks,
Issa

I figured it out.
I was simply able to use:
mynodesCRFormData.item(i).Name.englishName.value
mynodesFormData.item(i).Name.attribName.value;
where attribName is the name of the attribute and Name the name of the element.
Thanks,
Issa

Similar Messages

  • How to access XML attributes with JSTL

    Hello,
    I'm using the XML functions of JSTL. I'm trying to parse the following RSS feed.
    http://weather.yahooapis.com/forecastrss?p=USNY0996
    I can get it parsed and access the elements via JSTL, but is it possible to access the attributes of some of the elements?
    For example, how can I get the city attribute out of
    <yweather:location city="New York" region="NY" country="US" />

    Hello,
    I'm using the XML functions of JSTL. I'm trying to parse the following RSS feed.
    http://weather.yahooapis.com/forecastrss?p=USNY0996
    I can get it parsed and access the elements via JSTL, but is it possible to access the attributes of some of the elements?
    For example, how can I get the city attribute out of
    <yweather:location city="New York" region="NY" country="US" />

  • How to add XML attribute to an Element using BPEL assign

    I have a request xml to a bpel process that does not contain a attribute.
    After some process I need to create this missing attribute and set a value.
    I tried using the XML fragment in the Assign Activity. But how can I create a attribute?
    This XML node to which I am trying to create an attribute is a very huge node with lot of dynamic typing(xsi:type). I can just re-create the complete xml with required nodes.
    Does any one know how I can create a xml attribute using the BPEL assign? I do not want to use the Java code in my process.
    Thanks.

    I'm bit confused about what exact problem you are facing with attributes.
    You can check accessing XML attributes in BPEL Assign @ http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm#BABIHDHI from the page http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm.
    I suppose your source input has no attributes and destination has to be an xml with attribute of type xsi:type. You can use the assign activity as mentioned in above document to assign your type structure to type attribute.

  • Read XML attributes

    I have this xml.
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <root>
         <file name="Bohy" type="folder">
              <file name=".dropbox" type="file" />
              <file name="Beck" type="folder">
                   <file name="desktop.ini" type="file" />
              </file>
         </file>
         <file name="Links.txt" type="file" />
         <file name="Pipo" type="folder">
         </file>
    </root>And I need read attributes name and type, but with my code is not works. Can you repair me. Thanks
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    * @author thomas lokol
    public class Main {
         private static DocumentBuilderFactory dbf;
         private static DocumentBuilder builder;
         private static Document doc;
          * @param args
         public static void main(String[] args) {
              createDocuments();
              // Root element
              Node node = doc.getDocumentElement();
              String rootElement = node.getNodeName();
              System.out.println("Root element: " + rootElement);
              readNodes(node.getChildNodes());
         private static void readNodes(NodeList nodeList) {
              System.out.println(nodeList.getLength());
              for (int i = 0; i < nodeList.getLength(); i++) {
                   Node node = nodeList.item(i);
                   if (node.getNodeType() == Node.ELEMENT_NODE) {
                        Element element = (Element)node;
                   if(node.getNodeType() == Node.TEXT_NODE) {
                         NamedNodeMap attributes = node.getAttributes();
                         // Here is problem ...
                         for (int a = 0; a < attributes.getLength(); a++) {
                           Node theAttribute = attributes.item(a);
                           System.out.println(theAttribute.getNodeName() + "=" + theAttribute.getNodeValue());
         private static void createDocuments() {
              try {
                   dbf = DocumentBuilderFactory.newInstance();
                   builder = dbf.newDocumentBuilder();
                   doc = builder.parse("myFile.xml");
              } catch (Exception e) {
                   System.out.println("Chyba pri vytvareni");
                   e.printStackTrace();
    }Edited by: EJP on 23/04/2012 11:43: added {noformat}{noformat} tags. Please use them. Also fixed your title.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi,
    I would suggest that you use a more simple library like Dom4j,
    It is quite easy to use and is proven to have good performance on heavy tasks.
    you can access xml attributes with a single line cod :
    String value = element.attributeValue("Attribute name");you can download and view samples here : http://dom4j.sourceforge.net/

  • XML Attributes Created Twice in the XML after Saving in FM

    Hi All,
    I've built a structured application to read and write a custom XML. The file is opened just fine. However, when saving the XML in FM, some XML attributes appear in the XML twice. For example, in the original XML I have the following:
    <object_group doc_name="xxx" parsed_by_sym="false">
    </object_group>
    After I save the XML, it looks like this:
    <object_group doc_name="xxx" parsed_by_sym="false" doc_name="xxx" parsed_by_sym="false">
    </object_group>
    After the XML is saved, FM refuses to re-open it aborting the parsing. If I remove the doubled attributes manually in Notepad, then the XML is opened in FM again.
    Should I define anything in read/write rules? What am I doing wrong?
    I'm using an XSD, which I defined in structapp.fm.
    Thank you very much!

    Alex,
      Without looking at the application and document, I don't have any other ideas. To debug a situation like this, I would try variations such as the following, investigating any change that eliminates the doubled attribute:
    1) If you haven't already, shut your computer down and restart it.
    2) If the application uses a custom client or processing, remove them. If their absence makes a difference, the problem may originate in them.
    3) Simplify the test document as much as possible, probably in several steps. For example, remove all optional attributes and elements. Remove all non-containers (tables, xrefs, graphics, etc.) You may need to change the EDD or schema to create as short a document as you can that fails. The goal is to have a document with just a few elements and only one attribute that fails.
    4) Change the element and attribute names, which shouldn't make a difference, but may be worth testing.
    5) Simplify or eliminate the r/w rules.
    6) Simplify the EDD so that the only defined elements and attributes are the ones that appear in the small sample.
    7) Remove all format rules and autoinsertions from the EDD. The goal is to remove anything that should not be relevant.
    8) Simplify the schema in the same way.
    9) Remove the schema from the application. If doing so eliminates the duplicate, convert the schema to a DTD and see if using a DTD instead of the schema makes a difference.
    10) Make sure your have installed all updates to the version of FM you are using.
    11) If you have access to a different version of FM, see if it behaves the same way.
    Good luck and let us know when you find the problem.
         --Lynne

  • Accessing XML View through DBUri

    I am having problem in accessing XML View through HttpURI.
    Also i need some advise in following such architecture between my app server and DB server.
    The problem i am facing is that
    1. The query passed through URI does a full table scan, hence poor performance.
    2. Not able to query on date/timestamp.
    Any help would be appreciated.
    Thanks

    Here is how my output would be..
    <log systemID="00XXXABC01" MLN="9999" USN="00XXXPET01" timeStamp="Sun Jun 1 22:00:11 2003" timeZone="BST - Europe/London">
    <message type="XXXHealthPage" time="Sun Jun 1 22:00:11 2003" source="XXX">
    <text>This is manxx1 machine's HealthPage report</text>
    <detail>
    <generic_report title="XXX System Health Report">
         <emailaddr>[email protected]</emailaddr>
         <heading title="System Identification">
         <linevalue name="Report_date">Sun Jun 1 22:00:11 2003</linevalue>
         <linevalue name="Last_update_time">May 02 2003 22:00:14</linevalue>
         </heading>
    </generic_report>
    </detail>
    </message>
    </log>
    I have underlined the variables that i have to query on.. basically i have to select messages between certain times for a particular system.
    am trying a query..
    1. http://localhost:8080/oradb/MACLOG/TEST_MACHINE_XML1/ROW/log[@systemid="415444KCT"]
    This doesnt work for some reason.. i had to make systemid as a separate element.(@attribute doesnt work)2. i dono how to query for message[@time between to_char(...)]
    Any Help..

  • How to access XML elements by name in Extendscript??

    I'm almost done the script that I've been working on, but something has been nagging me since I started. When I did start, I looked at the JS Tools Guide CS5 that comes with the extendscript ide to check how to access XML elements, children, attributes etc. It says this:
    The XML object represents an XML element node in an XML tree. The topmost XML object for an XML file
    represents the root node. It acts as a list, which contains additional XML objects for each element. These in
    turn contain XML objects for their own member elements, and so on.
    The child elements of an element tree are available as properties of the XML object for the parent. The
    name of the property corresponds to the name of the element. Each property contains an array of XML
    objects, each of which represents one element of the named type.
    So basically it converts the XML into JSON. And you can access the properties like so:
    <book category="COOKING">
         <title lang="en">The Boston Cooking-School Cookbook</title>
         <author>Fannie Merrit Farmer</author>
         <year>1896</year>
         <price>49.99</price>
    </book>
    The Javascript statement bookstoreXML.book; returns the entire list of books.
    The statement bookstoreXML.book[0]; returns the XML object for the first book.
    The statement bookstoreXML.book[0].author; returns all authors of the first book.
    A couple pages down it talks about Retrieving contained elements using children(), elements(), descendants().
    So now I look through the XML Object properties and I see that I can use:
    xmlObj.child (which) which A String, the element name, or a Number, a 0-based index into this node’s child array.
    or
    xmlObj.descendants ([name])
    name Optional. A String, the element name to match. If not provided, matches all
    elements.
    or
    xmlObj.elements (name);
    name Optional. A String, the element name to match. If not provided, matches all
    elements.
    This is an excerpt of an XML I was working with:
    <ROW xmlns="http://www.filemaker.com/fmpdsoresult"
         MODID="16"
         RECORDID="11128">
       <Sign_Type>251.dr</Sign_Type>
       <fm:Location xmlns:fm="http://www.filemaker.com/fmpdsoresult" xmlns="">5-5024</fm:Location>
       <Line1>Zone
    Floor
    3
    Patient Rooms
    R532 - R436 even
    Patient Rooms
    R522 - R446 even
    Xavier Elevators
    Zone
    Patient Rooms
    R537 - 5757 odd
    Main Elevators
    Zone</Line1>
    </ROW>
    Extendscript will not give me an anything when I try to access elements by name. Instead I have to access by index, which works, but I'd rather search for names!
    Actually the console log returns: <![CDATA[]]>
    What am I doing wrong!?

    First, those E4X XML objects are definitely no JSON (plain data) - they have a multitude of methods, even for tasks that would easily be implemented as property (e.g. the length() function), and they also bind xml element and attribute names onto the objects, allowing to target a multitude of XML nodes with a single statement. Or did you mean your script with that "it"?
    Anyway, as you found out the ExtendScript XML object handles namespaces mostly by hiding them from you.
    You could play around with global namespace settings, see the JavaScript tools guide.
    You could also explicitly specify a namespace. This works for me:
    $.writeln(myXML["fm:Location"]);
    For simple use I had most success with a brute force approach that just strips the namespaces.
    function removeAllNamespace(xml)
              var ns =new Namespace();
              var d=xml.descendants();
              for (var i=0;i<d.length();i++)
        d[i].setNamespace(ns);

  • Access dynamic attributes BPM; error while activating the process in sxi

    hi everybody,
    I have to access dynamic attributs in a BPM condition. I thought I could achive this when I click the radiobutton "contextobject" in the condition editor.
    When using the value-help button on the contextobject a huge list of objects is shown for selection.
    Strange to me is that also the radionbutton "interface-variable" is checked. I can not uncheck this radiobutton. But this makes the error while activating:
    "Containerelement 'IDOC_'MyContainerelement'{XSDSIMPLE::xsd:string;SHeaderSUBJECT:ht' does not exist".
    Has anybody expirience using the dynamic attributes/contextobjekts in BPM?
    Thanks, Regards Mario

    Hi all,
    it seems to be impossible to access the attributes:
    Technical Context Object in ccBPM
    Regards Mario

  • How can I access the Attribute Values from the Search Region

    Hi all,
    I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
    I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
    Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
    I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
    Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
    If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
    SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
    I don't know how can I access the data from the Search Region.
    Please Help.
    Regards,
    Ranjith

    you could access the parameters entered in search region by the user as follows:
    You can get handle to the value entered by the user using queryListener method in af:query.
    You can intercept the values entered as described
    public void onQueryList(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
    for ( Criterion c : searchList) {
    if (c instanceof AttributeCriterion ) {
    AttributeCriterion a = (AttributeCriterion) c;
    a.getValues();
    for ( Object o : a.getValues()){
    System.out.println(o.toString());
    //call default Query Event
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    public void onQueryTable(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
    MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
    me.invoke(elctx, new Object[]{queryEvent});
    Thanks,
    Navaneeth

  • How can I access xml document from javascript whithin a JSP page

    how can I access xml document from javascript whithin a JSP page?
    I have a JSP that receives an XML document from a JavaBean, so I can access it within the entire JSP, but I need to access it from the javascript inside the JSP... and I have no idea how i can do this.
    Thanks in advance!

    The solution would only work on MS IE browsers, as other browsers do not support an XML DOM.
    It can be done, but you would be stuck with using the Microsoft broswer. If that is acceptable, I have some example code, and a book recommendation.

  • Getting at a top-level XML attribute

    It's Friday afternoon... I'm fried and can't seem to figure
    out how to get at a top-level XML attribute.
    Some specifics...
    My XML doc has a single attribute in the top node followed by
    several "version" nodes
    <projData projectName="Spry Project">
    <version>
    I successfully load and create an xml data set from said XML
    file. Later on, I use the getDocument() method to refer to the XML
    DOM doc used by the original xml data set. I need to extract the
    value of the attribute "projectName" into a javascript variable.
    The xpath query should be "projData/@projectName" but all I
    get returned is an undefined value.
    Any ideas? I'm sure it's something simple that I'm
    overlooking.

    > can you please helo.
    This is impossible.
    Obviously your ABAP mapping is wrong. Fix it.

  • File-Adapter: Variable substitution form payload XML-attribute

    Hi experts,
    is possible to use XML-attribute-content for variable substitution in file-Adapter?
    extract from XML:
    <?xml version="1.0" encoding="utf-8" ?>
    - <all>
    - <transaction <b>file="filename"</b>>
    - <table name="BPAADDRESS" options="insertIfUpdateFails">
    - <record id="1">
      <hkeycol name="BPAMAINHKEY">0010500345</hkeycol>
      <hkeycol name="USAGE">Invoice</hkeycol>
      </transaction>
    I want to get the value "filename" = attribute file of transaction.
    Is this possible?
    Thanks a lot,
    Florian

    I have done this taking a field from the XML.
    You have to map the location of the field within the XML...
    Taken from:
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
    Variable Substitution (Target Directory/File Name Scheme)
    If you set the Enable indicator, you can enter variables for the Target Directory and File Name Scheme. Enter the names of the variables and references in the table.
    &#9679;      Enter each variable that you reference in the Target Directory and File Name Scheme fields without the surrounding percentage sign under Name of Variables in the table.
    The variables can refer to attributes of the message header or elements of the message payload.
    &#9675;       If the variables are to refer to an attribute of the message header, add the prefix message: to the name of the variable under Reference. You can specify the following attributes of the message header:
    sender_party, sender_service, receiver_party, receiver_service, interface_name, interface_namespace,
    message_id (message ID with hyphens, for example 9fbe1ff1-9a0d-11d9-8665-cbf10a126331)
    message_id_hex (message ID in hexadecimal format, for example 9fbe1ff19a0d11d98665cbf10a126331)
    For example, if you want to specify the interface name from the message header in the target directory or in the file name scheme, enter message:interface_name as the reference.
    If one of the message attributes contains characters that are not permitted in a file name, for example \, /, :, *, ?, ", <, >, |, then these characters are replaced by an underscore ("_").
    &#9675;       If the variable refers to an element in XML schema, add the prefix payload: to the information under Reference. The reference then comprises a pseudo path description in the form of a comma-separated list with the schema namea,na,nameb,nb,....
    namea,nameb,... corresponds to the element name and na,nb,... corresponds to the occurrence of the element name at the respective level in the document.
    The description begins at the root of the document and ends at the respective element.
    To reference the element that is in bold in the example, the following expression is used: payload:root,1,e1,1,e2,2
    The parser searches for the first occurrence of the root element at the first level. It then searches for the first occurrence of e1 at the second level and for the second occurrence of e2 at the third level. The content of the last element (“Example Value”) is set as the value for a specified variable.
    <?xml version="1.0" encoding="UTF-8" ?>
    <root>
      <dummy>
         <e1>
            <e2>Data_1</e2>
            <f/>
            <g attr="abc">text</g>
            <e2>Data_2</e2>
         </e1>
      </dummy>
      <e1>
         <e2>illegal/value</e2>
         <f/>
         <g attr="abc">text</g>
         <e2 attr="fghij">Example Value</e2>
      </e1>
    </root>
    &#9679;      To disable the check the adapter performs for the element data, set the Disable Security Checks indicator.
    Otherwise, the adapter checks whether the element data contains characters that could lead to security risks in the file system environment. The check includes the characters “/“, “\“, and “..“.

  • Process XML attributes of all tables in a structured document

    Hi all,
    I try to process the XML attributes of all tables in a structured document.
    When I use SelectedTbl everything works fine for the selected table and the attributes of the tabelle Element are written correctly to the Console.
    doc = app.ActiveDoc;
    table = doc.SelectedTbl;
    if (table.TblElement)
        Console('Elementname: ' + table.TblElement.ElementDef.Name);
        tblEle = table.Element;
        attrs = tblEle.GetAttributes();
        for (i = 0; i < attrs.len; i++) {
            aName = attrs[i].name;
            aWert = attrs[i].values;
            Console( "     " + aName + "    " + aWert);     
    However when I use GetText(Constants.FTI_TblAnchor) to walk through all tables of the documens neither ElementDef.Name nor Attributes are processed.
    var flow = doc.FirstFlowInDoc;
    var textItems = flow.GetText(Constants.FTI_TblAnchor);
    while(iTab<textItems.length) {
    table = textItems[iTab].obj;
    if (table.TblElement)
        Console('Elementname: ' + table.TblElement.ElementDef.Name);
        tblEle = table.Element;
        attrs = tblEle.GetAttributes();
        for (i = 0; i < attrs.len; i++) {
            aName = attrs[i].name;
            aWert = attrs[i].values;
            Console( "     " + aName + "    " + aWert);     
    Any Suggestions?
    Yours
    Wolfgang

    You'll probably want all the tables from the main flow. Try
    var flow = doc.MainFlowInDoc;
    Kind regards
    JoH

  • How to access an attribute(this is referencing to another class) in a class

    Dear Gurus,
    I have to read an attribute of a class and that attributes type another class.
    I have intantiated the class and my question is how to read the attribute. I know I can not dirrectly read the attribute since this is another class. I think I have to first reference the attribute right? Please advise me.
    My code looks like below:
    data: lo_fpm                                 type ref to if_fpm.
    data: lo_msg_mgr                        type ref to if_fpm_message_manager.
    data: lo_component_manager    type ref to cl_fpm_component_manager.
    lo_fpm = cl_fpm_factory=>get_instance( ).    " cl_fpm_factory is a class which has a static method get_instance
    lo_msg_mgr = lo_fpm->mo_message_manager.
    lo_component_manager = lo_fpm->mo_component_manager.
    The above statement is giving syntax error. I do not know why.
    The basic difference b/n the two methods is if_fpm~mo_message_manager    type ref to if_fpm_message_manager    and
    mo_component_manager     type ref to cl_fpm_component_manager.
    Any help would be appreciated.
    Thanks,
    GSM

    Hello
    I cannot test the following coding because I do not get the singleton instance yet it should work:
    *& Report  ZUS_SDN_CL_FPM_FACTORY
    *& Thread: How to access an attribute(this is referencing to another class) in a class
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1398429"></a>
    REPORT  zus_sdn_cl_fpm_factory.
    DATA: go_fpm TYPE REF TO cl_fpm.  " class implements if_fpm.
    DATA: go_msg_mgr TYPE REF TO if_fpm_message_manager.
    DATA: go_component_manager TYPE REF TO cl_fpm_component_manager.
    START-OF-SELECTION.
      BREAK-POINT.
      go_fpm ?= cl_fpm_factory=>get_instance( ). " cl_fpm_factory is a class which has a static method get_instance
      CHECK ( go_fpm IS BOUND ).
      go_msg_mgr           = go_fpm->mo_message_manager.
      go_component_manager = go_fpm->mo_component_manager.
    END-OF-SELECTION.
    Regards
      Uwe

  • XML attributes as a response

    My skills are rudimentary, I'm a new flex developer. I have
    done all of the tutorials and examples and I'm just struggling with
    using an XML attribute checking a response.
    I've written a simple flex 3 app to talk to Asterisk AJAM.
    I'm writing the login piece-- and i'm having trouble parsing this
    response from an http service (successful login) my problem comes
    in with the value not being as such
    <item>valuehere</item> it's part of the tag, an
    attribute i would suppose.:
    <ajax-response>
    <response type="object" id="unknown">
    <generic response="Success" message="Authentication
    accepted"/>
    </response>
    </ajax-response>
    What I have is a simple app with a http service and a login
    form. I have an event handler for the HTTP service, but I don't
    know how to parse for that generic response tag. Anyone know how to
    format an XML object for that type of response and throw a simple
    if statement looking for that attribute?
    Failure looks like this BTW:
    <ajax-response>

    <response type="object" id="unknown">
    <generic response="Error" message="Authentication
    failed"/>
    </response>
    </ajax-response>
    Thank you,
    Brian

    I've came up with the following code trying to use XML
    attributes from the response above--- it doesn't work but here is
    what I have (right now the if statement is commented out.... i'm
    trying to have it do an alert which doesn't work either):
    ---source---
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:states>
    <mx:State name="Logged In">
    <mx:SetProperty target="{panel1}" name="width"
    value="95%"/>
    <mx:SetProperty target="{panel1}" name="height"
    value="95%"/>
    <mx:RemoveChild target="{password}"/>
    <mx:RemoveChild target="{username}"/>
    <mx:RemoveChild target="{label1}"/>
    <mx:RemoveChild target="{Submit}"/>
    <mx:RemoveChild target="{label2}"/>
    <mx:SetProperty target="{panel1}" name="title"
    value="Once Logged In"/>
    <mx:AddChild relativeTo="{panel1}"
    position="lastChild">
    <mx:Label x="10" y="10" text="You properly
    authentictaed!"/>
    </mx:AddChild>
    <mx:AddChild relativeTo="{panel1}"
    position="lastChild">
    <mx:Label x="10" y="62" text="Label"/>
    </mx:AddChild>
    </mx:State>
    </mx:states>
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.ResultEvent;
    var MyXML:XML;
    private function checkLogin(evt:ResultEvent):void
    MyXML = evt.result.channel.item;
    mx.controls.Alert.show(MyXML.@*);
    trace(MyXML.@*.toXMLString());
    /* if (MyXML.attribute(ajax-response.response.@generic) ==
    "Success") {
    if (MyXML.ajax-response.response.(@generic == "Success"))
    currentState = "Logged In";
    if (MyXML.ajax-response.response.(@generic == "Error"))
    mx.controls.Alert.show('Invalid username/password');
    ]]>
    </mx:Script>
    <mx:HTTPService id="login_user"
    result="checkLogin(event)" showBusyCursor="true" method="GET" url="
    http://72.22.224.90:8088/asterisk/mxml"
    useProxy="false">
    <mx:request xmlns="">
    <action>login</action>
    <username>
    {username.text}
    </username>
    <password>
    {password.text}
    </password>
    </mx:request>
    </mx:HTTPService>
    <mx:Panel resizeEffect="Resize" width="250" height="200"
    layout="absolute" title="Login System" horizontalCenter="0"
    verticalCenter="-2" id="panel1">
    <mx:Label x="10" y="10" text="Username:" id="label1"/>
    <mx:TextInput x="10" y="36" id="username"/>
    <mx:Label x="10" y="66" text="Password:" id="label2"/>
    <mx:TextInput x="10" y="92" id="password"
    displayAsPassword="true"/>
    <mx:Button x="10" y="122" label="Submit" id="Submit"
    click="login_user.send();"/>
    </mx:Panel>
    </mx:Application>

Maybe you are looking for