Try to read the attributes of an XML feed, having problems

Here is the XML file that I use (hoopstest.xml):
< bbcareer version = "1.1.0" date = "2007, July 3" >
< player name = 'John Doe' >
< season year = "2004-05" gp = '22' gs = '0': = '343' minavg = "15.6" tp = "134" ptsavg = "6.1".
FGM = fga "49" = '107' fgpct = '.458' fgm3 = '5' fga3 = '16' fg3pct = ".313" = "31" = "47" ftpct FTA ftm = ".660.
Oreb = '20' suspicious = "42" treb = '62' rebavg = "2.82" pf = dq '37' = '0' ast = "11" wanting = blk = '29' '12' stl '8' = >
< Tester > 1 < / Tester >
< / season >
< season year = "2005-06" gp = "26" gs = "15" min = "582" minavg = "22.4" tp = "274" ptsavg = "10.5."
FGM = fga "107" = '184' fgpct = '.582' fgm3 = '5' fga3 = fg3pct "19" = '.263' ftm '55' ALE '82' ftpct = = = '.671.
Oreb = suspicious "49" = "83" treb = "132" rebavg "5.08" pf = dq = "56" = "2" ast = "25" will = blk '49' = '31' stl '23' = >
< Tester > 2 < / Tester >
< / season >
< season year = "2006-07" gp = "25" gs = "25" min = "768" minavg = "30.7" tp = '490' ptsavg = '19.6.
FGM = "179" fga = "314" fgpct = '.570' fgm3 = '12' fga3 = '31' fg3pct = '.387' ftm '120' ALE '163' ftpct = = = '.736.
Oreb = suspicious "89" = "106" treb = '195' rebavg = "7.80" pf = dq '74' = '3' ast = "37" wanting = blk = '72' '40' stl '26' = >
< Tester > 3 < / Tester >
< / season >
< season year = gp 'TOTAL' = '73' gs = "40" min = "1693" minavg = "23.2" tp = ptsavg '898' = '12.3 ".
FGM = fga "335" = "605" fgpct = '.554' fgm3 = fga3 "22" = "66" fg3pct = ftm ".333" = "206" ALE = "292" ftpct = ".705.
Oreb = suspicious "158" = "231" treb = "389" rebavg = "5.33" pf = dq '167' = '5' ast = '73' wanting = blk = '150' stl "83" = "57" > < Tester > 4 < / Tester >
< / season >
< / player >
< / bbcareer >

The tester is just if I can check for the number of records is read.

In my app below, 4 Tester records appear, but the attributes are not. No idea why? TIA.

<? XML version = "1.0" encoding = "utf-8"? >
"" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute".
creationComplete = "feedRequest.send ()" >
"" < mx:HTTPService id = "feedRequest" url = " http://www.stats.com/hoopstest.xml" useProxy = "false" / >
< mx:Panel x = "10" y = "10" width = "475" height = "400" layout = "absolute" title = "Player stats" >
< mx:DataGrid = "20" x = "20" id = "dgPosts" width = "400".
dataProvider = "{feedRequest.lastResult.bbcareer.player.season}" >
< mx:columns >
< mx:DataGridColumn headerText = "Test" dataField = "Tester" / >
< mx:DataGridColumn headerText = 'year' dataField="@year"/ >
< mx:DataGridColumn headerText = "gp" dataField="@gp"/ >
< mx:DataGridColumn headerText = "Min" dataField="@min"/ >
< / mx:columns >
< / mx:DataGrid >
< / mx:Panel >
< / mx:Application >

change the dataProvider to

dataProvider = "{feedRequest.lastResult.player.season}" "

When you get back XML you don't have to make reference to the root node.

Tags: Flex

Similar Questions

  • LabVIEW 2013 close when I try to read the database table.

    LabVIEW 2013 close when I try to read the database table.
    I get the error message, Labview falls just crashes. I use Labview x 32 and connective Toolkit of connectivity of database on Windows 7 x 64. I connect to PostgreSQL with ODBC driver, the connection is stable.
    In my database, I have a lot of tables, I read all those without one.
    When I try to read table bad I get data then labview crash. When I restart Labview, I have no message on the error.
    Also I try to use LabSQL-1. 1a. But it has the same result.

    I found the solution.

    I think the problem was that I have very large table in my database.

    At the beginning I received data from table with next quiry:

    SELECT column1, column2 FROM 'table ';

    But when I write then:

    SELECT column1, (column2, ',') array_to_string FROM 'table ';

    all worked!

  • How to read the data with different XML schemas within the unique connection?

    • I have Oracle database 11g
    • I access it via JDBC: Slim, version 11.2.0.3, same as xdb.
    • I have several tables, each has an XMLType column, all based on patterns.
    • There are three XML schemas different registered in the DB
    • Maybe I need to read the XML data in multiple tables.
    • If all the XMLTypes have the same XML schema, there is no problem,
    • If patterns are different, the second reading will throw BindXMLException.
    • If I reset the connection between the readings of the XMLType column with different schemas, it works.

    The question is: How can I configure the driver, or the connection to be able to read the data with different XML schemas without resetting the connection (which is expensive).

    Code to get data from XMLType is the implementation of case study:

     1   ResultSet resultSet = statement.executeQuery( sql ) ; 
    2   String result = null ;
    3    while(resultSet.next()) {
    4   SQLXML sqlxml = resultSet.getSQLXML(1) ;
    5   result = sqlxml.getString() ;
    6   sqlxml.free();
    7   }
    8   resultSet.close();
    9    return result ;

    It turns out, that I needed to serialize the XML on the server and read it as BLOB. Like this:

     1    final Statement statement = connection.createStatement() ;  2    final String sql = String.format("select xmlserialize(content xml_content_column as blob encoding 'UTF-8') from %s where key='%s'", table, key ) ;  3   ResultSet resultSet = statement.executeQuery( sql ) ;  4   String result = null ;  5    while(resultSet.next()) {  6   Blob blob = resultSet.getBlob( 1 );  7   InputStream inputStream = blob.getBinaryStream();  8   result = new Scanner( inputStream ).useDelimiter( "\\A" ).next();  9   inputStream.close(); 10   blob.free(); 11   } 12   resultSet.close(); 13   statement.close(); 14  15   System.out.println( result ); 16    return result ; 17
    

    Then it works. Still, can't get it work with XMLType in resultset. On the customer XML unwrapping explodes trying to pass to another XML schema. JDBC/XDB problem?

  • Hi, I hava a mac and I download adobe digital edition. When I try to read the book his writing HI! I use a mac. I have download adobe digital edition and when I try to open the writing book is: E_LIC_ALREADY_FULFILLED_BY_ANOTHER_USER I don't know what to

    Hi I hav a mac and I download adobe digital edition. When I try to read the book his writing E_LIC_ALREADY_FULFILLED_BY_ANOTHER_USER I don't know what to do

    Download, installation, introduction to Adobe Digital Editions>

    Error: E_LIC_ALREADY_FULFILLED_BY_ANOTHER_USER

  • I bought adobe for windows, but I think they gave me the keys for mac so am having problem downloading

    I bought adobe for windows, but I think they gave me the keys for mac so am having problem downloading

    Hi wadadar85548349,

    Please contact our service customer to get this fixed number, follow this link Contact Customer Care, sign in using your adobe ID & click on "still need help? Contact us' button.

    Kind regards
    Nicos

  • "Popup error ' A:\ is not Accessible, incorrect function" when you try to read the "A" drive in Explorer.

    When you try to read a disk in the 'A' drive from Windows Explorer, I get a Popup with a white 'X' in a red circle and a message that "A:\ is not Accessible" "Incorrect function" and an OK button at the bottom.  It happens to any disk, formatted or not, with the files or empty.  I replaced the disk drive - no help.

    I don't know if it's a windows setting went crazy or a motherboard problem.  My BIOS seems correct.  If I do a 'fill' of window hardware in administrative tools he tells me that I have data on the disk.

    I have XP - SP3.

    Any ideas-

    go to a command prompt and type "sfc/scannow" (without the quotes) and let it run... see if this is helpful at all.

    Hope do you feel better soon.

  • How to read the text of an XML with the dom parser?

    Hi all

    It's my code. How will I be able to read the text inside the xml file using dom parser?

    my xml file is like this...



     
        LLEYTON
        Hewitt
        Australian
       
        1
        897
       

     


        André
        Agassi
        American
       
        2
        679
       

     

    which I stored in _xml.

    InputStream is = getClass () .getResourceAsStream (_xml);

    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance ();

    DocumentBuilder db = dbf.newDocumentBuilder ();

    Doc document = db.parse (is);

    NodeList nl = doc.getElementsByTagName("*");

    for (int i = 0; i)< nl.getlength();="">

    {

    System.out.println ("node name" + nl.item (i) .getNodeName ());  Player, firstname, lastname, tennis o/p

    System.out.println ("node value" + nl.item (i) .getTextContent ());  o/p value null, null, null, null

    }

    I want the text in the first name should get displayed as "Lleyton" and any other text in other tags as Andre/Agassi/American/2/679

    You can install JDE and operates the samples, you will find XMLDEMO that will help you read XML application blackberry;

    good luck;

  • When you try to read the book to Win 10 PC get message E_ADEPT_NO_TOKEN?

    I downloaded an ebook and when I try to read I get an E_ADEPT_NO_TOKEN error message.  What is going on?  Other CMHA ebooks open very well.

    E_ADEPT_NO_TOKEN there is an error in the file itself. Download the new file otherwise work ask the Depo to check the download of the file.

  • Read the length of an XML

    Hello

    I have a XML file with the following structure:

    <rootEl>
    
        <entry category = "00">
            <sub_entry_1>Content</sub_entry_1>
            <sub_entry_2>Content</sub_entry_2>  
        </entry>
       
        <entry category = "01">
            <sub_entry_1>Content</sub_entry_1>
            <sub_entry_2>Content</sub_entry_2>  
        </entry>
       
        <entry category = "02">
            <sub_entry_1>Content</sub_entry_1>
            <sub_entry_2>Content</sub_entry_2>  
        </entry>
    
    </rootEl>
    
    

    As you can see there 3 elements, or children (don't know the right therm). But it has 3 "entry".

    I want a script to read this as an XML and tell me the length of the XML elements.

    For example, assume that this XML file is inside the Office:

    var xmlFile = new File ("~/desktop/myFile.xml");
    xmlFile.open ("r");
    var xmlContent = xmlFile.read();
    xmlFile.close();
    var xmlObj = new XML(xmlContent);
    
    

    It is perfect. At this point, I have a XML object in my script, called xmlObj code.

    The problem now is: I need to know the length of this xmlObj. It is and must say I have 3 entries. But, if I put "xmlObj.length", that it is an array object, then it returns nothing.

    Guide looked at JavaScript tools, but perhaps I missed something. I have not found a method to read the length of the XML data.

    Can someone help me?

    Thank you very much

    Gustavo.

    xmlObj.children () .length)

    I always get this error...

  • How to read the attributes inferred

    Hello

    I'm generating the PDF of the entire session at the end of the goal achieved. Now, in the transformation(xsl:fo) of xsl, I want to read some attributes inferred from the overall entity instance.

    is there a way to do this?

    Help, please.

    Thank you
    Lokesh

    Lokesh,

    You can get such attributes by adding decision reports that are also available in the control of your documents. Refer to the section change how data summarized and reviewed interview--> add document link to summary screen in the documentation of the OPA for more information.

    Thank you
    Kristy

  • try to read the portrait of dorian gray of martin mystery operation I installed it without problems, but it will not play. any ideas? __

    I use windows vista and have x 10 live that I wondered if I downloaded direct x 8.1 that it would replace the x 10 live

    Hi georgie12,

    Welcome!

    I would like to ask you a few questions in order to get a better understanding of this issue so that we can provide you with better assistance.

    (a) what is you get the exact error message?

    You can try to update the display drivers for Windows Vista.

    1. open Device Manager by clicking the Start button, type Device Manager in search and press enter. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    2. in Device Manager, expand display adapter, select the graphics card in the list.

    3. right click on the graphics card and click Update driver software.

    4 Select automatically update driver software.

    You can also view the system manufacturer's Web site and download the latest display drivers for Windows Vista.

    For more information, you can consult the following link:

    Update a hardware driver that is not working properly: http://windows.microsoft.com/en-us/windows7/Update-a-driver-for-hardware-that-isn ' t-work properly

    Hope this information is useful.
    Let me know if it worked.

    Concerning
    Jeremy K
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Windows Media Player error when you try to read the file: error downloading codec

    Yesterday, I got no sound and video, today I have sound but no video.  What is happening with this?

    I updated my drivers and now the video does not work.  I use Windows Media Player c. 9.00.00.4510.  When I click on read the file, in the black bar at the bottom ready it flashes very fast "error downloading codec".  Before I updated the drivers, I got the video with no sound.  Where this codec disappeared to?   How can I get that back?

    I have updates for the 9 Series Player and I'm happy with it.  If I move up to 10 or 11, codecs and drivers will work with it automatically or will I have the same problem?

    OS: Windows XP sp3

    Thanks for any help, Cdee.

    Hi CDEKV,

    Check to see if the following is useful.

    Method 1: Follow the steps in the below article mentioned to see if it helps.

    How to Download Codecs automatically in Windows Media for Windows XP player

    Method 2: Install the Codec Installation Package to check the issue.

    Download details: Codec Installation Package

    Method 3: Upgrade to the latest version of Media Player.

    Download Windows Media Player - Microsoft Windows

  • Windows media player error "Windows Media Player has encountered a problem when you try to read the file" after burning CDs.

    Original title: "missing songs" in my windows media player then burn them on several cd :((

    I burned songs to several cd using my Windows media player to make different Cd, but after I returned to my library all the songs that I burned to the CD have disappeared, they are there, but they won't play it is as if they have been deleted, a window appears saying that windows media player has encountered a problem when you try to play the file. I did not notice this until after Cd burning a few I can't do more because if I keep going I'm not going to have more songs in my library! I don't know what to do im going crazy, it took me a long time to get all of these songs and now he disappeared! I have Windows 7 Ultimate is the version 12.0.7601.17514 hope that helps

    Hello
     
     
    They were playing before you burn CDs?
     
     
    Method 1:
    Open the troubleshooting Windows Media Player settings Troubleshooter
    http://Windows.Microsoft.com/en-us/Windows7/open-the-Windows-Media-Player-settings-Troubleshooter

    Method 2:
    This problem may be due to database corruption. You can delete the Windows Media Player database and check if the problem persists.

    Steps to clear the database of windows media player:

    a. exit Windows Media Player.
    b. Click Start, run, type %LOCALAPPDATA%\Microsoft\Media Player and then click OK.
    c. Select all files in the folder and then click on Delete on the file menu.

    Note you don't have to remove the folders that are in this folder.

    d. restart Windows Media Player.

    Note: Windows Media Player automatically rebuilds the database.

    If this does not resolve the problem, disable the Windows Media Player database cache files. To do this, follow these steps:

    a. exit Windows Media Player.

    b. Click Start, click Run, type % LOCALAPPDATA%\Microsoft and then click OK.

    c. Select the Media Player folder, and then click on Delete on the file menu.

    d. restart Windows Media Player.

    Note Windows Media Player automatically rebuilds the database.

  • Try to read the flow front of cloud in the share pod

    I am developing a Flash project to be loaded in a sharing module in Acrobat Connect Pro to play the live stream via Amazon Cloudfront in AC. I have a project developed in Flash Builder using the sdk Flex 4.1 4.6 and OSMF.swc 1.5, tagetting Flash Player 10.1. The best I could do is to read the flow locally in Flash Player, but not when the SWF is loaded into Acrobat Connect Pro. I also played with success a f4m stream hosted by Adobe when the player IS loaded into Acrobat Connect Pro. This flow is, in my view, a video on demand, and not a live stream (the url is http://mediapm.edgesuite.net/osmf/content/test/manifest-files/dynamic_Streaming.f4m).

    Any suggestions are welcome.

    The code for this project is:

    package

    {

    Import flash.display.Sprite;

    Import org.osmf.media.MediaPlayerSprite;

    Import org.osmf.media.URLResource;

    [SWF(width ='680', height ='382', backgroundColor =' #000000 ', frameRate ="30"")]

    public class OSMF extends Sprite

    {

    private var mps:MediaPlayerSprite;

    private track from the var : Sprite;

    private var classes: Sprite;

    public function OSMF()

    {

    init();

    }

    private Function init():void

    {

    MPS = new MediaPlayerSprite();

    addChild (mps);

    / / data flows before cloud that plays locally in flash player, but not when loaded in AC:

    MPS.resource = new URLResource ([URL of feed cloudfront]);

    / / no cloud before the VOD stream that plays when you load in AC:

    //mps.resource = new URLResource ("http://mediapm.edgesuite.net/osmf/content/test/manifest-files/dynamic_Streaming.f4m");

    }

    }

    }

    Acrobat Connect Pro is based on the Flex 3 SDK kit. 5b. Some of the features in your code are more recent than connect. So, when you load your SWF for the module sharing, Flash player is unable to read some features because they are more recent than the SDK to load Swf (3. 5 b to Connect). However when you run it locally run you as a standalone application in Flex 4.

  • Error when you try to start the Medal of Honor Allied Assault: a problem caused blocking the program works correctly. Windows will close the program and notify you if a solution is available.

    Medal of honor allied assault has stopped working?

    This message seems to me when I start the Medal of honor Allied:

    (a problem caused blocking the program works correctly windows will close the program and notify you if a solution is available)

    Hello

    ·         How long have you been experiencing this problem?

    You can reduce hardware acceleration and check if the problem persists:

    1. right click on the desktop and choose personalize.

    2. click on display settings.

    3. in the display settings window, click on advanced settings.

    4. display the Troubleshooting tab.

    5. click on change settings.

    6 reduce hardware acceleration.

    Also try the procedure from the following link: http://windows.microsoft.com/en-US/windows7/Fixing-game-performance-problems

    Also try to check if the game works the clean boot: http://support.microsoft.com/kb/929135

    NOTE: make sure that you start the computer in normal mode after troubleshooting is done

    You can also post your questions on: http://support.ea.com/

Maybe you are looking for

  • Mini will not start capital el updated

    I was updating capital on the other on my mini. Power went out at halfway, now it won't start.  Help please

  • Satellite A100 PSAA2 - HDD counters every 30 seconds after the BIOS update

    Hello I recently renewed my BIOS to 2.20 to 2.30 on a Toshiba A100 PSAA2, after that my disc HARD spindows every 30 seconds when not in service, the shortenes course, that's life. I tried, clean XP SP3 and other Toshiba utils, programs like drive HAR

  • I can't go back to the previous menu

    the menu button on the remote does nothing.  I'm stuck at the end in the menus for 4 of my apps now - can't go back any ideas? Nine 4th gen ATV it is out of the box last night

  • XPS 9100 and 3 TB HARD drive

    This seems to be a common problem, but I can't seem to find a solution that works for me. My system: Win7 x 64 Intel I7 920 8 GB of memory BIOS has been simply upgraded to A04 Intel Matrix Storage Manager v.9.6, A01 installed Intel Matrix Storage Con

  • Windows 7 PC will never update

    In the Action Center Windows Update (Important) I click on change settings. Windows Update is DISABLED. I can find no way to change it on YOU. I can see the history of updates - this PC has been updated in 2012 - the date I bought it! Please, how can