How to make a data set from this???

Hi all,
I have to read an XML file and then display each item on my
page.
Now, I have no problems doing this with simple, one level XML
files like an RSS file for example. But the XML I have to read is a
little different to what I am used to:
quote:
<SearchResult CartNumber="A418 " CartType="M"
StartTime="2008-06-11T14:44:29.323"
EndTime="2008-06-11T14:47:46.15" CartComplete="true" StaticText=""
NextPlayTime="0001-01-01T00:00:00"
GUID="e76df096-139e-4270-a5dc-4a2cf0cddf16">
<CustomProperties>
<CustomProperty PropertyName="iTunesLink"
PropertyValue="" />
<CustomProperty PropertyName="SongHookLink"
PropertyValue="" />
<CustomProperty PropertyName="RingToneLink"
PropertyValue="" />
<CustomProperty PropertyName="AlbumArtLink"
PropertyValue="Stranger In Town Album - Bob Seger.jpg" />
<CustomProperty PropertyName="TicketLink"
PropertyValue="" />
<CustomProperty PropertyName="SongLyricPhrases"
PropertyValue="" />
</CustomProperties>
<MusicData CartNumber="A418" Title="STILL THE SAME"
Artist="BOB SEGER" Length="3:11.0" LengthSeconds="191"
CategoryName="Exile" CategoryCode="X" Note1="." Note2="." />
</SearchResult>
You can see it has multiple levels for each search result.
Can someone help me work out how I would display the results
on a page, repeating. (There will be 5 of these 'SearchResult'
items.
Again, I am fine with single level XML.. but as you can see..
this one has Custom properties which is a level deep, then all the
MusicData in one bit..
Any help is greatly appreciated.
Kind Regards
Scott

Hi Scott,
I'm beggining to understand a bit better what it is you want
to display, and I realize you're still a bit confused as to what
Spry actually does to the XML.
If you call {data::@iTunesLink} on the HTML, according to the
definition of the "data" dataset, Spry will lookup an attribute
name iTunesLink on the following XPath:
"SearchResults/SearchResult/CustomProperties/CustomProperty". The
problem is, that attribute does not exist on your XML.
Valid calls would include {data::@PropertyName} and
{data::@PropertyValue} and would yield, respectively, "iTunesLink"
and "
http://bigpondmusic.com/Album/Snow-Patrol/Eyes-Open.aspx?search=2304296&h=30081101"
as an example first result (considering there is no "repeat" set).
Does that make sense to you?
If I've interpreted your XML correctly, I think you are
making an assumption that Spry understands that PropertyName and
PropertyValue are related. It does not make that assumption, and it
shouldn't - they are completely different things in your XML, they
just happen to be attributes for the same tag ("CustomProperty").
Why don't you try to trim down your XML to something more
straightforward like this:
<CustomProperties>
<iTunesLink value="
http://bigpondmusic.com/Album/Snow-Patrol/Eyes-Open.aspx?search=2304296&h=30081101"
/>
<SongHookLink value="" />
<RingToneLink value="" />
<AlbumArtLink value="Eyes Open Album - Snow Patrol.jpg"
/>
<TicketLink value="" />
<SongLyricPhrases value="" />
</CustomProperties>
Then use subpaths instead of NestedXML (better for your kind
of XML), and call the attributes like this (placeholder >>
yield):
{iTunesLink/@value} >>
http://bigpondmusic.com/Album/Snow-Patrol/Eyes-Open.aspx?search=2304296&h=30081101
{SongHookLink/@value} >> yields blank
{RingToneLink/@value} >> yields blank
{AlbumArtLink/@value} >> Eyes Open Album - Snow
Patrol.jpg
You get the picture...
Unless there is a reason to use that particular structure on
the XML, I recommend you streamline it...
Give it a shot and then come back again when you hit the next
obstacle.
Regards,
Tomas

Similar Messages

  • This is how to make a 2nd set of recovery disks.

    Recovery disk creation only allows you to make 1 set.This is how to make a 2nd set of recovery disks. should you mess up the 1st time doing them, purchased a used notebook and the owner didnt supply you with them, if you loose them or they get damaged.  1) Delete the file RMCStatus.bin (hidden) from two places:  C:\Program Files(x86)\Hewlett-Packard\Recovery Manager\  The root of a drive D:\ (RECOVERY partition) 2) Remove Rebecca.dat ( hidden) from:C:\Windows\System32\ Follow the instructions here:HP Recovery Disk/USB Creation Instructions Show Hidden Files and Folders:
      W8 users,,,,,,
    In order to find the files to be deleted, you must change your folder options to show hidden files and drives. Type folder options in search to bring it up.  

    Can not locate these two files: 1) Delete the file RMCStatus.bin (hidden) from two places:  C:\Program Files(x86)\Hewlett-Packard\Recovery Manager\
     2) Remove Rebecca.dat ( hidden) from:C:\Windows\System32\
    What to do any help? Uses HP pavilion 17 

  • My 3gs wont restore after ios 5 update. I have tried firmware restore and restore from backup, neither works. All I get is "iphone restore failed because backup session failed" Any ideas on how to make a successful restore with this ios 5 update?

    My 3gs wont restore after ios 5 update. I have tried firmware restore and restore from backup, neither works. All I get is "iphone restore failed because backup session failed" Any ideas on how to make a successful restore with this ios 5 update?

    I was having the same problem, I backed up my phone and then updated to iOS 5 and then it kept telling me it could not restore from my backup as it had failed.  After reading a bunch of forums and posts and trying everything, I did manage to get it to work.  I had tried the Time zone, creating a new computer user account, disabling anti-virus, etc.
    It took a combination of things, one of which was disabling the anti-virus completely and copying the contents of the backup folder to my desktop and then deleting everything in the backup folder.  Then I rebooted the PC, entirely disabled the anti-virus, copied the one backup I wanted to restore from the desktop to the backup folder and then trying to restore.  Low and behold the phone said restoring from backup and I am back in business, so when in doubt, trying combining some of the fixes together.

  • How to  extract  master data  attribute from  r/3 to bw give steps details

    how to  extract  master data  attribute from  r/3 to bw give steps details screenshots

    Hi
    Go through the below process to extract Master Data Attribute from R/3
    Hi,
    Maintaining Generic DataSources
    Use
    Regardless of the application, you can create and maintain generic DataSources for transaction data, master data attributes or texts from any transparent table, database view or SAP Query InfoSet, or using a function module. This allows you to extract data generically.
    Procedure
    Creating Generic DataSources
    1. Select the DataSource type and specify a technical name.
    2. Choose Create.
    The screen for creating a generic DataSource appears.
    3. Choose the application component to which you want to assign the DataSource.
    4. Enter the descriptive texts. You can choose any text.
    5. Select the datasets from which you want to fill the generic DataSource.
    a. Choose Extraction from View if you want to extract data from a transparent table or a database view. Enter the name of the table or the database view.
    After you generate the DataSource, you have a DataSource with an extraction structure that corresponds to the database view or transparent table.
    For more information about creating and maintaining database views and tables, see the ABAP Dictionary Documentation.
    b. Choose Extraction from Query if you want to use a SAP Query InfoSet as the data source. Select the required InfoSet from the InfoSet catalog.
    Notes on Extraction Using SAP Query
    After you generate the DataSource, you have a DataSource with an extraction structure that corresponds to the InfoSet.
    For more information about maintaining the InfoSet, see the System Administration documentation.
    c. Choose Extraction Using FM if you want to extract data using a function module. Enter the function module and extraction structure.
    The data must be transferred by the function module in an interface table E_T_DATA.
    Interface Description and Extraction Process
    For information about the function library, see the ABAP Workbench: Tools documentation.
    d. With texts you also have the option of extracting from fixed values for domains.
    6. Maintain the settings for delta transfer, as required.
    7. Choose Save.
    When performing extraction, note SAP Query: Assigning to a User Group.
    Note when extracting from a transparent table or view:
    If the extraction structure contains a key figure field that references a unit of measure or a currency unit field, this unit field has to be included in the same extraction structure as the key figure field.
    A screen appears on which you can edit the fields of the extraction structure.
    8. Edit the DataSource:
    &#9675; Selection
    When you schedule a data request in the BI scheduler, you can enter the selection criteria for the data transfer. For example, you can determine that data requests are only to apply to data from the previous month.
    If you set the Selection indicator for a field within the extraction structure, the data for this field is transferred in correspondence with the selection criteria in the scheduler.
    &#9675; Hide field
    You set this indicator to exclude an extraction structure field from the data transfer. The field is no longer available in BI when you set the transfer rules or generate the transfer structure.
    &#9675; Inversion
    Reverse postings are possible for customer-defined key figures. Therefore inversion is only active for certain transaction data DataSources. These include DataSources that have a field that is marked as an inversion field, for example, the update mode field in DataSource 0FI_AP_3. If this field has a value, the data records are interpreted as reverse records in BI.
    If you want to carry out a reverse posting for a customer-defined field (key figure), set the Inversion indicator. The value of the key figure is transferred to BI in inverted form (multiplied by –1).
    &#9675; Field only known in exit
    You can enhance data by extending the extraction structure for a DataSource by adding fields in append structures.
    The Field Only Known in Exit indicator is set for the fields of an append structure; by default these fields are not passed to the extractor from the field list and selection table.
    Deselect the Field Only Known in Exit indicator to enable the Service API to pass on the append structure field to the extractor together with the fields of the delivered extract structures in the field list and in the selection table.
    9. Choose DataSource ® Generate.
    The DataSource is saved in the source system.
    Maintaining Generic DataSources
    &#9679; Change DataSource
    To change a generic DataSource, in the initial screen of DataSource maintenance, enter the name of the DataSource and choose Change.
    You can change the assignment of a DataSource to an application component or change the texts of a DataSource. Double-click on the name of the table, view, InfoSet or extraction structure to get to the appropriate maintenance screen. Here you make the changes to add new fields. You can also completely swap transparent tables and database views, though this is not possible with InfoSets. Return to DataSource maintenance and choose Create. The screen for editing a DataSource appears. To save the DataSource in the SAP source system, choose DataSource ® Generate.
    If you want to test extraction in the source system independently of a BI system, choose DataSource ® Test Extraction.
    &#9679; Delta DataSource
    On the Change Generic DataSource screen, you can delete any DataSources that are no longer relevant. If you are extracting data from an InfoSet, delete the corresponding query. If you want to delete a DataSource, make sure it is not connected to a BI system.
    NR

  • Help!! i dont know how to make use of token from string tokenizer :(

    Hi,
    I would like to ask how to manipulate the token that are taken from string tokenizer. For example :
    input = a b 1 f 986
    supposed output:
    a
    b
    1
    f
    986
    How to make the output look like this?
    Output = (a,b,f),(1,986)
    Below is the source code of Algebra.java
    import java.io.*;
    import java.util.*;
    * Read and print, using BufferedReader from System.in, onto System.out
    public class Algebra {
    public static void main(String[] av) {
    try {
    BufferedReader is = new BufferedReader(new InputStreamReader(System.in));
    String inputLine;
    System.out.print("Input =");
    while ((inputLine = is.readLine()) != null) {
    System.out.println("Output="+inputLine);
    StringTokenizer st =
    new StringTokenizer(inputLine, ", |");
    while (st.hasMoreElements())
    System.out.println("Token: " + st.nextElement());
    break;
    is.close();
    } catch (IOException e) {
    System.out.println("IOException: " + e);
    Thank You

    You can modify this to serve your goal.
    BufferedReader is=null;
    try {
    is = new BufferedReader(new InputStreamReader(new FileInputStream("Data.txt")));
    StreamTokenizer st = new StreamTokenizer(is);
    int n=0,k=0,q=0;
    String[] s=new String[20];
    String[] s0=new String[10];
    while(st.nextToken() != StreamTokenizer.TT_EOF) {
            switch(st.ttype) {
              case StreamTokenizer.TT_EOL:
                s[k] = new String("EOL");k++;
                break;
              case StreamTokenizer.TT_NUMBER:
                s0[q] = Double.toString(st.nval);q++;
                break;
              case StreamTokenizer.TT_WORD:
                s[k] = st.sval; // Already a String
                 k++;
                break;
              default: // single character in ttype
                s[k] = String.valueOf((char)st.ttype); k++;
            }  //end of while
       //   Some output processing here
    }catch(IOException ioe){
       ioe.printStackTrace();
    }catch(ArrayIndexOutOfBoundsException bx){
       System.err.println(bx);
    }finally{
           try{      if(is !=null)     is.close();}catch(IOException ioe){;}
    }

  • How to make the date to be entered as dd-mon-rrrr  using form personalizati

    Hi friends,
    how to make the date entered to be dd-mon-rrrr format.....
    the date should be entered only in this format...or esle it should not accept the date
    how to do this with form personalization.....
    thanks

    1) Instead of personalization, set ICX: Date format mask profile appropriately using sysadmin responsibility at the appropriate level.
    2) If you have to use this new format just for one form, then use personalization to set the profile option in the when-new-form-instance. But unsetting it will be a problem.
    I recommend option 1 above.
    Hope this answers your question,
    Sandeep Gandhi

  • How do I remove date imprints from my pictures?

    How do I remove date imprins from my pictures?

      This is normally set in camera but can be changed in elements. In Organizer select a photo and on the top menu click edit à Adjust Date & Time.
     

  • How to pass a data set as a filter?

    Hello everybody!
    Are asking me to do the following:
    Select from a Combo Box classifications suppliers and all suppliers to pass on the whole as a result of a query filter.
    At this time I was only able to pass the values of the first, someone will have some idea on how to pass a data set as a filter?
    The result of my selection, as a way to "Store" and assign it as my input filter query.
    thanks for your help.

    Hi Jan,
    thanks for your help, but...
    My problem is passing the result of a query directly to another query, to me that this generates a result.
    For Example: zquery_1, is the entry qualification of suppliers and I returned a set of suppliers.
    The zquery 2, receives as input suppliers that set me back and the materials associated with the suppliers.
    To achieve this, I am passing the result of a zquery_1 store and east asginandolo as variable input to zquery_2, my problem is that this just me reading the first of the records.
    If the 3 providers zquery_1 me back, how can I pass these 3 andalusia zquery_2 providers without the user having to select them?
    greetings
    Manuel Sandoval

  • Need to load large data set from Oracle table onto desktop using ODBC

    I don't have TOAD nor any other tool for querying the database.  I'm wondering how I can load a large data set from an Oracle table onto my desktop using Excel or Access or some other tool using ODBC or not using ODBC if that's possible.  I need results to be in a .csv file or something similar. Speed is what is important here.  I'm looking to load more than 1 million but less than 10 million records at once.   Thanks.

    hillelhalevi wrote:
    I don't have TOAD nor any other tool for querying the database.  I'm wondering how I can load a large data set from an Oracle table onto my desktop using Excel or Access or some other tool using ODBC or not using ODBC if that's possible.  I need results to be in a .csv file or something similar. Speed is what is important here.  I'm looking to load more than 1 million but less than 10 million records at once.   Thanks.
    Use Oracle's free Sql Developer
    http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
    You can just issue a query like this
    SELECT /*csv*/ * FROM SCOTT.EMP
    Then just save the results to a file
    See this article by Jeff Smith for other options
    http://www.thatjeffsmith.com/archive/2012/05/formatting-query-results-to-csv-in-oracle-sql-developer/

  • Can't create Data Set from BI analysis

    Hi,
    I use BIP 11g and I want to create new Data Set based on Oracle BI Analysis. But when I choose my analysis (query) in BI catalog and click Ok button it show me Processing.. and then... nothing happends (Browser still show me window Create data set - Oracle BI Analysis )
    So I can't create Data Set from BI analysis.
    Is there anybody who made this well?
    Any one has idead on how to resolve this?
    Thanks,
    Dmitry

    Hi,
    Could you explain how you solved this issue. I am having the same problem but I am not using cyrilic symbols.
    Regards.

  • Defining a spry data set from a url variable

    I am developing a family web site that, among other things, uses a single 'recipe' page to display recipes from different xml files as called by a url variable (e.g. ?xmlFile="{url}"&recipeName="{name}") from a summary page.  I can get the recipe name to reproduce using a $_GET php function, but I cannot establish the data set that way.  How can I define the data set from the incoming URL variable?  The necessary files are:
    The starting point from which I send the selected URL variable (use the scampi recipe)  http://ebogott.com/recipeBox.php.
    The file that is generated is http://ebogott.com/recipe.php?XMLfile=GrilledScampiOnAngelHair.xml&recipeName=Grilled%20Sh rimp%20Scampi%20on%20Angel%20Hair%20Pasta
    This methodology will allow me a number of cascading selections.  I know this is not unique.  I just haven't figured it out.
    don Carlos de la Playa

    don Carlos,
    The following shows the strength of the Spry framework. All very easy and simple.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMasterDetail.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    var dsRecipes = new Spry.Data.XMLDataSet("recipes/recipes.xml", "recipes/recipe");
    var dsIngredients = new Spry.Data.XMLDataSet("recipes/{dsRecipes::url}", "recipe/ingredients/ingredient");
    var dsProcess = new Spry.Data.XMLDataSet("recipes/poultrySoup.xml", "recipe/process/element");
    //-->
    </script>
    </head>
    <body>
    <div class="MasterDetail">
      <div spry:region="dsRecipes" class="MasterContainer">
        <div class="MasterColumn" spry:repeat="dsRecipes" spry:setrow="dsRecipes" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">{name}</div>
      </div>
      <div spry:detailregion="dsRecipes dsIngredients dsProcess" class="DetailContainer">
        <div class="DetailColumn">{@genre}</div>
        <div class="DetailColumn">{@serves}</div>
        <div class="DetailColumn">{@time}</div>
        <div spry:repeat="dsIngredients">
          <div class="DetailColumn">{dsIngredients::qty}</div>
          <div class="DetailColumn">{dsIngredients::measure}</div>
          <div class="DetailColumn">{dsIngredients::item}</div>
        </div>
        <div spry:repeat="dsProcess">
          <div class="DetailColumn">{dsProcess::element}</div>
        </div>
      </div>
      <br style="clear:both" />
    </div>
    </body>
    </html>
    You will have to give a bit of style to the detail region.
    I hope this helps.
    Ben

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • How to use open data set in SAP

    Hi SAP Gurus,
            Could anyone help, how to use open data set in SAP.
          I need to upload a file from Application server (ZSAPUSAGEDATA) to internal table (IT_FINAL).
    Thanks & Regards,
    Krishnau2026

    Hi Krishna.
    These are the steps you need to follow.
    tables: specify the table.
    data: begin of fs_...
            end of fs_    " Structure Field string.
    data: t_table like
            standard table
                      of fs_...
    data:
    w_file TYPE string.
    data:
      fname(10) VALUE '.\xyz.TXT'.
    select-options: if any.
    PARAMETERS:
      p_file LIKE rlgrap-filename.
    w_file = p_file.
    select .... statement
    OPEN DATASET fname FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    *OPEN DATASET fname FOR OUTPUT IN BINARY MODE.
    LOOP AT t_... INTO fs_....
    write:/ .....
    TRANSFER fs_... TO fname.
    or
    TRANSFER t_... TO fname
    ENDLOOP.
    CLOSE DATASET fname.
    Reward points wisely and if you are benefitted or ask for more detailed explanation if problem not solved.
    Regards Harsh.

  • How to find the data loaded from r/3 to bw

    hi
    how to find the data loaded from r/3 to bw is correct . i am not able to find which feild in the query is connected to which feild in the r/3 . where i am geting the data from r/3 . is there any process to find which feild  and table the data is comming from . plz help
    thanks in advance to u all

    Hi Veda ... the mapping between R/3 fields and BW InfoObjects should take place in Transfer Rules. Other transformation could take place in Update Rule.
    So you could proceed this way: look at InfoProvider Data Model and see if the Query does perform any calculation (even with Virtual keyfigures / chars). Than go back to Update Rules and search for other calculation / transformation. At least there are Tranfer Rule and eventually DataSource / Extraction Enhancements.
    As you can easily get there are many points where you have to look for ... it's a quite complex work but very usefull.
    Once you will have identified all mappings / transfromation see if BW data matchs R/3 (considering calculations ...)
    Good job
    GFV

  • How to make a jar file from a java file?

    how to make a jar file from a java file, is there any one tht can help me thank you;

    You can study this.
    http://java.sun.com/docs/books/tutorial/jar/basics/index.html

Maybe you are looking for

  • How do I remove date/time stamp?

    Upon uploading the pictures into the Lightroom 'library' none of them appeared to have the date stamp that they did in camera. After a few minutes, the date stamp for each started to appear. Seeing that they first loaded without the date stamp leads

  • HTTP - SOAP

    Hi gurus, We want to create the following scenario: HTTP - XI - SOAP We have test with several combinations of the parameters of the HTTP Adapter Sender and the SOAP Adapter Receiver and we obtain: java.io.IOException: invalid content type for SOAP:

  • With the new version of numbers, 3.0, how can I stop the spread sheet from scrolling horizontally without reducing the size?

    With the new version of numbers, 3.0, how can I stop the document from moving horizontally?  When I scroll up or down I find it annoying that the document might shift to the left, and then I have to scroll it back to the right.  The only way I've fou

  • Always Use Artboard to Export  (CS5)

    In adobe Illustrator CS5 - Is there a way to always Use Artboards when exporting to JPG...etc? - instead of having to click the check box every time? Actions don't work because they save the path that was last used - I just want to simply be able to

  • Diff. btw. Region edit controls and provider.xml controls on rendering portlet UI

    hi, Apologize if this has been asked already. What are the differences if any between - - controlling the display of portlet header/border in the provider.xml file (containerRenderer set to false) V/S - controlling in the page edit mode (edit default