Tooltip with xml data set

I have posted this over on the Spry forum but wonder if someone else has had a similar issue and found a solution as I am trying to find the answer to this quickly if possible; I want to use a tooltip with an xml data set.
I have an xml data set of events and within it there is a tooltip element. How can I get another element to act as a trigger so my tooltip appears when I mouseover the element?
My data set is displaying correctly. I'm trying to get the event title element to act as the trigger and the code that I have so far:
<div spry:region="eventsDS">
        <table width="533">
          <tr>
            <th width="108" spry:sort="date">Date</th>
            <th width="105" spry:sort="title">Title</th>
            <th width="98" spry:sort="location">Location</th>
            <th width="202" spry:sort="price">Price</th>
          </tr>
          <tr spry:repeat="eventsDS">
            <td>{date}</td>
            <td><a href="#tooltiptrigger">{title}</a></td>
            <td>{location}</td>
            <td>{price}</td>
          </tr>
        </table>
      </div>
      <div class="tooltipContent" id="sprytooltip" spry:detailregion="eventsDS">{tooltip}</div>
<p><a href="#top">back to top</a></p>
      <script type="text/javascript">
var sprytooltip = new Spry.Widget.Tooltip("sprytooltip", "#tooltiptrigger");
      </script>

I see & chars in your xml, try wrapping it in <[CDATA[
]> tags like this:
<description> <[CDATA[Beer (B), Beer & Wine (BW)
or Beer, Wine & Liquor (BWL)<br />
Off sale only, no consumption on the licensed
premises]]></description>
Also if check out your xml in firefox, you will see that it
shows a parsing error, most likely caused by the issue i addressed
above.

Similar Messages

  • XML Data Set with Spry Slides - Please Help

    Hi, I'm trying to combine XML Data Set with sliding tabs.
    I've created two keys responsible for sliding the tabs:
    <a id="previous" href="#"
    onclick="sp1.showPreviousPanel();">Previous</a>
    <a id="next" href="#"
    onclick="sp1.showNextPanel();">Next</a>
    Then XML Data Set is used to populate the tabs, but only a
    single tab remains visible, and a "Next/Previous" buttons are used
    to move to the next tab. And this is where the problem arises.
    The problem is that, every time I refreash the gallery or
    load it for the first time, I have to press TWICE the "Next" button
    to move to the next image. After that, its all fine, and slides
    well. It's only the FIRST time when loaded.
    Please help.
    Here's the full code:
    <div id="images_gal" >
    ///////////////////////////////////////// The menu - the
    culprit///////////////////////////////////////////
    <div id="menu_next">
    <a id="previous" href="#"
    onclick="sp1.showPreviousPanel();">Previous</a>
    <a id="next" href="#"
    onclick="sp1.showNextPanel();">Next</a>
    </div>
    //////////////////////////////////////// The Sliding Panels
    Gallery ////////////////////////////////////////////////////
    <div id="example2" class="SlidingPanels" tabindex="0" >
    <div class="SlidingPanelsContentGroup"
    spry:region="dsSpecials">
    <div spry:repeat="dsSpecials" id="{first}"
    class="SlidingPanelsContent{second}"><div class="top_gal"
    ></div><div class="main_gal"><img
    src="images/Galery/{third}" alt="Digital_Signage" width="600"
    height="304" />
    <p class="screen_gal"><a href="#"
    onclick="MM_openBrWindow('film1.html','Coloris','width=340,height=260,
    top=250, left=250')">CLICK TO VIEW</a></p>
    </div><div
    class="bottom_gal"></div></div>
    </div>
    </div>

    Anyone has any idea why I need a DOUBLE Click to start moving
    the sliding panels?
    I've just completed two tutorials by Don Booth.
    1/Building a Spry Sliding Panels widget
    2/Building a photo album with the Spry framework
    But what I try to COMBINE them - display the photos in
    sliding panels, I also need to DOUBLE click the "next" buton before
    it starts scrolling.
    Why is that Double Click needed? Help Please.
    Here's my code for the combined version:
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    a {
    position:relative;
    left:23px;
    top:127px;
    z-index:10000;
    color: #FF0000;
    </style>
    <script type="text/javascript"
    src="photo_album_samples/includes/xpath.js"></script>
    <script type="text/javascript"
    src="photo_album_samples/includes/sprydata.js"></script>
    <script type="text/javascript"
    src="Spry/SprySlidingPanels.js"></script>
    <link type="text/css" rel="stylesheet"
    href="Spry/SprySlidingPanels.css">
    </head>
    <body>
    <div >
    <a href="#" onclick="sp1.showPreviousPanel();">Previous
    Panel</a>
    <a href="#" onclick="sp1.showNextPanel();" >Next
    Panel</a>
    </div>
    <div id="panelwidget" class="SlidingPanels" >
    <div class="SlidingPanelsContentGroup"
    spry:region="dsGallery" >
    <div spry:repeat="dsGallery" class="SlidingPanelsContent"
    id="p1"><img
    src="photo_album_samples/thumbnails/{@thumbpath}"/></div>
    </div>
    </div>
    <script type="text/javascript">
    var dsGallery = new
    Spry.Data.XMLDataSet("photo_album_samples/photos.xml",
    "gallery/photos/photo");
    </script>
    <script type="text/javascript">
    var sp1 = new Spry.Widget.SlidingPanels("panelwidget");
    </script>
    </body>
    </html>

  • Build a table based on XML data set with Spry

    Hi there,
    I'm new to spry technology therefore forgive any basic question of mine.
    I'm trying to fill content in a table based on XML data set values but nothing is shown :-(
    here is my code.... any suggestion? pls tell me where I'm wrong.
    Thank you in advance
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    var uscite = new Spry.Data.XMLDataSet("data/Calendario 2011.xml", "csv_data_records/record", {sortOnLoad: "Date", sortOrderOnLoad: "ascending"});
    uscite.setColumnType("Date", "date");
    uscite.setColumnType("km", "number");
    </script>
    <div class="RankContainer" id="UsciteDiv" spry:region="uscite" >
              <table width="100%" border="0" class="RankTable">
                <tr>
                  <th width="10%" scope="col" spry:sort="Date">Data</th>
                  <th width="20%" scope="col">Destinazione</th>
                  <th width="5%" scope="col">KM</th>
                  <th width="35%" scope="col">Percorso</th>
                  <th width="30%" scope="col">Breve</th>
                 <!-- <th width="15%" scope="col">Mappa</th>-->
                </tr>
                <tr>
                   <script type="text/javascript">
           var rows = uscite.getData();
        for (var i = 0; i < rows.length; i++)
         if (rows[i]["Mappa"].startsWith("/"))
          rowContent = "<td> si </td>";
         else
              rowContent = "<td> no </td>";
         document.write("<td>{Date}</td>");
         document.write("<td>"+rowContent+"</td>");
         document.write("<td>{km}</td>");
         document.write("<td>{Percorso}</td>");
         document.write("<td>{Breve}</td>");
          </script>
               </tr>
              </table>
           </div>

    Sure this is how it should work (except that no anchor tag shall be present for Destinazione whereas Mappa has no real value in)
    http://www.gsc-borsano.it/_Calendario%202011.html
    and this is the non working page
    http://www.gsc-borsano.it/_v2Calendario%202011.html
    Thanks

  • CollapsiblePanel with XML data source

    I've been working with the CollapsiblePanel for the past two
    nights. I can't make the panel collapse at runtime when I have XML
    data attached.
    I validated by downloading one of the Adobe Lab
    CollapsiblePanel samples. I validated that I could make the sample
    work from my Dreamweaver CS3 environment. Then, I added an XML data
    source and retested. The panel would not collapse. Then, I took out
    the XML dataset and retested the CollapsiblePanel. It worked.
    Is this a design feature? I can't imagine this was designed
    to work this way. I'm trying to create a scrollable div that can
    collapse. I have everything working except the collapse feature.
    (BTW: I tried defining a spry:region and spry:detailregion, it
    didn't seem to matter.)
    CODE SNIPIT
    <div id="CollapsiblePanel1" class="CollapsiblePanel"
    spry:region="dsWeek">
    <div class="CollapsiblePanelTab">Standard Collapsible
    Panel</div>
    <div class="CollapsiblePanelContent">
    <p>{feature}</p>
    </div>
    </div>

    How does the xml data look like? in GML?
    If the xml data set is not too large, maybe you can add them (after your application has parsed them) as additional MapViewer GeoFeatures in a map request.
    Currently MapViewer (preview or production release of 9.0.4) does not support xml-only datasource.
    We will look into incorporating GML or other standard-based xml datasource for a future release of MapViewer.

  • XML Data Sets and IE8

    I have an issue with Spry XML Data sets that is driving me nuts.
    The setup is quite straightforward. I have a PHP script which submits a SOAP request, the result of which is pure XML. I echo this XML out as the result of the script.
    I have another page on which is one or more Spry XML Data Sets. These data sets use the previous script as the source. I know this works OK because when i 'Get Schema' in the XML dataset dialog in Dreamweaver, the schema is properly displayed. This page also has a Spry Table on it, which uses the dataset as the source. There is nothing else on the page at all.
    Now, when I preview this page in Firefox, Chrome, Opera or Safari, it displays fine. However, when I preview it in IE, the table briefly flashes up then disappears. A quick look at the source of the page shows the HTML all laid out very licely, but the Spry fields still show with their placeholders (e.g. {Balance}) instead of the actual value. Im left with a totally blank page in IE.
    I have tried running in compatibility mode with no effect. I found a posting on Experts Exchange (yuk!) where someone else was having the problem but this turned out to bedue to badly formed XML. I have run my XML though XMLSpy and several online validators and it checks out every time.
    Any ideas? I am slowly losing the will to live....
    Si

    Hi,
    I'm trying to debug the same problem...I think.The pages work in firefox on PC & MAC but stop with the {data_name} in IE on both PC & MAC.
    I'm using Dreamweaver CS3 with ADDT. I've read the posts about adding the content-type to my file that ADDT created for me just before the XMLExport, so I've added that to the get_menu_1_info.php file (see lines 42-46). I've peeked into the XMLExport.class.php file to see that the Execute function is supposedly already sending the header info (see line 223). But I'm not getting the data into IE.
    Any help would be appreciated!
    here's where you can see the page:
    https://hbblearning.org/Takv3uMYsX7cVK5eRo/newcomer_info.html
    here's where I generate the xml file to be consumed:
    https://www.hbblearning.org/get/get_menu_1_info.php
    I've attached the files for you to see.

  • Spry xml data set, accessing specific rows

    Hello. I've been trying to build a website using Spry XML
    Data Sets, and while I've accomplished my goals for now, I don't
    think the solution I came up with is the best.
    The website consists of several areas that show projects.
    Each project has several fields that are to be filled with content
    retrieved from the xml files, but the projects are not all exactly
    alike and some have specific fields that others don't require.
    All the info is available in several languages, so for now
    I've created an xml file for each one. An xml file could be like
    Code Part1. (Why I can't add several code snippets along the post
    baffles me. I mean, I can't, right?)
    This dataset, for simplicity purposes, is not dependent on
    the language (Code Part2).
    And then there are the content areas (Code Part3).
    So as you see, each project has its own structure. This makes
    using spry:repeat a not very effective method for filling in all
    the content. Ideally I should be able to access each row in the
    dataset through some sort of value, like id, or one of its
    children's values. The ds_RowID depends on the row order, so unless
    there's another way to use it, it doesn't solve my problem.
    Here's what I've come up with (Code Part4).
    This works (in FF3 OSX, at least), although there are some
    other problems that might make it necessary to create a spry:region
    (or at least use spry:repeat) for each field. Anyway, it sounds
    silly and wasteful to go through every row of the dataset everytime
    for each of the fields that need to be filled.
    My hope is that I'm ignorant of some much better method of
    achieving my goals, something more direct and elegant.
    Can anyone help me out with this? Thank you very much in
    advance.

    Hi there
    You are indeed absolutely correct a spry region should have been shown, my appologise for that, the code is wrapped in a standard spry region.
    That being said i have used a work around in the SQL SELECT statement of the xmlExportObj, Recordset to find the information required without having to do any IF, ELSE on the page.
    Many thanks for your reply and for pointing out my mistake in how I had presented my question.
    My next question is to follow seperately
    Regards
    Ray

  • Spry XML data set and dynamic post variables

    Hi,
    I am trying to create an XML data set that has dynamic post
    variables.
    Everytime something is pressed on the page a variable changes
    and I then want to reload the XML data set using the new variable.
    I know I can just pull in an XML with all possible variables
    and filter client side but this would make it way too large.
    Does anyone know what I may need to do.
    I tried this:
    var myVar = 0;
    var dss = new Spry.Data.XMLDataSet (
    '../../cgi-bin/server_details.pl' , 'top' , { method: 'POST' ,
    postData: sid=ajaja21&ip=127.0.0.1&cid=' . myVar ,
    subPaths: [ "auth" , "plugins" , "plugins/plugin" ] , keepSorted:
    "true", sortOnLoad: "plugins/plugin/order", sortOrderOnLoad:
    "descending", useCache: false, loadInterval: 10000 } );
    onclick="myVar=1";
    But the script doesn't understand the post variables sent (it
    does when I remove the . myVar part and put in a static value). I
    think it isn't sending that dynamic variable with the post
    variables.
    Any ideas anyone?
    Thanks

    Well I had it working when I stripped back everything and
    just had the dss data set and a single onclick function, but now
    that I put it back together it hash foobared again.
    Here are the relevant bits of code that I've changed.
    The function to change server id:
    //function to run when changing the server id
    function changeServer ( sid ) {
    //set the url to use the current server id
    dss.setURL = ( '../../cgi-bin/server_details.pl' , { method:
    'POST' , postData:
    'sid=7gv1m3vjvagfl7h7qeefb8iodj8evhmb&ip=127.0.0.1&cid='+sid
    //force a reload of the server data
    dss.loadData();
    The inital load of the data set
    var dss = new Spry.Data.XMLDataSet (
    '../../cgi-bin/server_details.pl' , 'yams' , { method: 'POST' ,
    postData:
    'sid=7gv1m3vjvagfl7h7qeefb8iodj8evhmb&ip=127.0.0.1&cid=0' ,
    subPaths: [ "auth" , "plugins" , "plugins/plugin" ] , keepSorted:
    "true", sortOnLoad: "plugins/plugin/order", sortOrderOnLoad:
    "descending", useCache: false, loadInterval: 10000 } );
    And the part that changes the server id
    <td align="left" style="cursor:default; width:174px;"
    onclick="changeServer({dsv::servers/server/@id})">{dsv::servers/server/name}</td>
    I checked that the function is receiving the correct server
    id and I even tried hard coding the cid variable to 2 in the change
    function but it still wasn't changing on the server side.
    Any ideas?
    Thanks

  • Spry Tables and Xml Data Sets viewed in IE7

    Has anyone ever run into a problem with Spry Tables and Xml
    Data Sets viewed in IE7? Work fine in IE6 and Firefox, but get the
    error "exception caught while loading feed.xml: [object Error]" in
    IE 7. Any ideas?
    Attached is the xml I'm using.
    Thanks

    I came looking for the answer to this question. I could not
    find an answer. Eventually I found it the answer that worked for
    me, a graphic designer with not much experience in xml.
    The following url provided an errata file in PDF format:
    www.peachpit.com/dwcs3cib
    which includes the following addendum to the incomplete
    instructions in the book i was using to learn about spry:
    "If Internet Explorer 7 is your primary browser, you'll nee
    to take some extra steps to view spry dynamic content locally.
    First, your site must be within the local server webroot; be sure
    your Lessons folder is stored within the Inetpub>wwwroot folder.
    Next, double-click the site name in the files panel to open the
    Site Definition dialogue. Click the Testing Server category; from
    the Access List choose Local/Network. Click Okay to close the Site
    Definition dialogue. Now, when you preview your page with Internet
    Explorer, your local Web server (localhost) serves the page as
    designed."
    Horray for me! Now i can move on from here and actually get
    some work done!

  • Formatting tags in xml data set used for spry region

    I am trying to put <p>,,,</p> tags in my xml data set but they cause the field to not load. For example I would like to create an xml file as follows:
    <blog>
          <blogentry>
              <blogdate>Jan 2009</blogdate>
              <blogtitle>January Blog</blogtitle>
              <blogtext><p> this is a paragraph</p>
    <p>and so is this</p>
              </blogtext>
         </blogentry>
    </blog>
    When I do this I don't get anything in the spry region.  If I remove the <p>,</p> tabs it works.
    Is there anyway to do this (not just with <p> but with any tags ... ie. tables, etc.).
    Thanks/Hal

    I have an online example:
    http://www.pearlmanpr.com/perspective_test.html
    The spBlog.xml file contains test junk.  If I put the <[[CDATA....]]> inside the BlogEntry/BlogText tag it doesn't work at all.
    http://www.pearlmanpr.com/perspective_test_2.html
    If I use it without the <[[CDATA..]] it doesnt work either.
    http://www.pearlmanpr.com/perspective_test_3.html
    If I use it without any <> within the tag it sort of works (still needs to be aligned).

  • How to i add an image path with spry data set

    hi
    how to i add an image path with spry data set. I made a xml file and then created a data set in html but image won't load
    this is my XML
    <?xml version="1.0" encoding="UTF-8"?>
    <banner width = "185" height = "400">
        <item>
            <image scr = "nui-panforte-recipe_01.jpg" ></image>
            <description>CHOC-COCONUT PANFORTE</description>      
            <text1>Try this delicious GLUTEN FREE Christmas treat</text1>
            <text2>CHOC-COCONUT PANFORTE</text2>
        </item>
    </banner>
    this is my HTML
    <!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>
    <script type="text/javascript">
    <!--
    var ds1 = new Spry.Data.XMLDataSet("recipe_banner.xml", "banner/item");
    //-->
    </script>
    </head>
    <body>
    <div spry:region="ds1">
      <table>
        <tr spry:repeat="ds1">
          <td>{image}</td>
          <td>{description}</td>
          <td>{text1}</td>
          <td>{text2}</td>
          <td>{text3}</td>
          <td>{text4}</td>
          <td>{link}</td>
          <td>{url}</td>
          <td>{target}</td>
        </tr>
      </table>
    </div>
    </body>
    </html>

    It would be helpfull if you actually created an <img> tag to start with
    <img src="{image/@src}" />
    would work.

  • XML Data Set selection by attribute?

    I am new to Spry and was trying to work with the XML Data Set
    feature. I have an XML file with the schema listed below. I wanted
    to know if it were possible to only grab the data from this XML
    file if it matches a certain type? For example, grab data from
    seminarType where @type="condition1"? Is this able to be done or
    will I have to generate an XML file for each type? My goals was to
    have one large file to grab data from.
    <seminars>
    <seminarType type="">
    <seminarSession type="">
    <seminar>
    <location><![CDATA[]]></location>
    <date></date>
    <time></time>
    <seats></seats>
    <directions><![CDATA[]]></directions>
    </seminar>
    </seminarSession>
    </seminarType>
    </seminars>

    The seminar node contains all the information I want to grab.
    I need to be able to select those nodes based off seminarType @type
    and then seminarSession @type.
    Example:
    <seminars>
    <seminarType type="type1">
    <seminarSession type="session1">
    <seminar>
    <location><![CDATA[location]]></location>
    <date>12-12-2007</date>
    <time>14:00</time>
    <seats>23</seats>
    <directions><![CDATA[mapquest
    directions]]></directions>
    </seminar>
    </seminarSession>
    <seminarSession type="session2">
    <seminar>
    <location><![CDATA[location]]></location>
    <date>10-08-2007</date>
    <time>10:00</time>
    <seats>15</seats>
    <directions><![CDATA[mapquest
    directions]]></directions>
    </seminar>
    </seminarSession>
    </seminarType>
    </seminars>
    So I would want to grab all the session nodes where
    seminarType @type="type1" and seminarSession @type="session1"
    Does this help?

  • Target Spry RowID on page with Multiple data sets from another page

    Hi all,
    I am trying to target a specific data item, on a page with
    multiple data sets, from a link on another page. (I also have to
    pass the link through Flash, but lets start with the simple
    part...)
    You can take a look at the site in progress here:
    http://www.3andband.com/TestSite/iframeTest3.html
    From the Home page I want to link to specific news or concert
    items on the News page
    I have been trying to get SpryURLUtils to do it but I can't
    seem to get it working.
    Any help would be greatly appreciated.
    Thanks!
    Ben

    did u try if it even passes the row value?? with a simple
    alert? alert(params.row)
    Also maby u need to reorder the scripts to this;
    <script src="../SpryAssets/SpryURLUtils.js"
    type="text/javascript"></script>
    <script src="../SpryAssets/xpath.js"
    type="text/javascript"></script>
    <script src="../SpryAssets/SpryData.js"
    type="text/javascript"></script>
    <script src="../SpryAssets/SpryCollapsiblePanel.js"
    type="text/javascript"></script>
    <script src="../SpryAssets/SpryEffects.js"
    type="text/javascript"></script>
    <script src="../SpryAssets/SpryAccordion.js"
    type="text/javascript"></script>
    and your js script
    var params = Spry.Utils.getLocationParamsAsObject();
    var dsConcerts = new
    Spry.Data.XMLDataSet("includes/concerts.xml", "Concerts/concert");
    dsConcerts.setColumnType("image", "image");
    var dsNews = new Spry.Data.XMLDataSet("includes/news.xml",
    "News/item");
    //Set an observer so that when the data is loaded, we update
    the current row to the url param value
    dsNews.addObserver({ onPostLoad: function(ds, type) {
    dsNews.setCurrentRow(params.row); }
    function MM_effectBlind(targetElement, duration, from, to,
    toggle)
    Spry.Effect.DoBlind(targetElement, {duration: duration,
    from: from, to: to, toggle: toggle});
    So url params get loaded before the data

  • MapViewer with XML data source

    Hello all,
    We have the MapViewer read data from JDBC data source doing spatial queries. Can any one tell me if I can use XML data source as input to the MapViewer.
    We have a data source that is only available thru Web services, we cannot make a database view on the schema.
    If not is it planned in the production version.
    Thanks

    How does the xml data look like? in GML?
    If the xml data set is not too large, maybe you can add them (after your application has parsed them) as additional MapViewer GeoFeatures in a map request.
    Currently MapViewer (preview or production release of 9.0.4) does not support xml-only datasource.
    We will look into incorporating GML or other standard-based xml datasource for a future release of MapViewer.

  • Populating a PDF form with XML data

    Hi folks,
    I would like to create some pdf form template, populate it with xml data and output from it a pdf file.
    Can I do such thing using LiveCycle?
    Yair

    With the recent release Adobe changed the name to Adobe Digitial Enterprise Platform (ADEP)..
    http://www.adobe.com/solutions/customer-experience/enterprise-platform.html
    ADEP server software comes with lot of services to help with many solutions for the enterprises, so it would be better to call the Adobe Sales team and discuss your needs and they will be best people to suggest what suits your company requirements.
    Thanks
    Srini

  • XmlDataProvider .... is gone completely in my Xaml file. Why? How many different ways to deal with xml data source through WPF

    I followed a procedure described in a book.
    1. insert "Inventory.xml" file to a project "WpfXmlDataBinding" .
    2. add the XML data source through the data panel of "blend for 2013", named it "InventoryXmlDataStore" and store it in the current document.
    3. dragged and droppped the nodes from the Data panel onto the artboard.
    Then I checked my Xaml file against the one provided by the book
    Xaml file by the book:
    <Window.Resources>
    <!-- This part is missing in my xaml file --><XmlDataProvider x:Key="InventoryDataSource"
    Source="\Inventory.xml"
    d:IsDataSource="True"/>
    <!-- This part is missing in my xaml file -->
    <DataTemplate x:Key="ProductTemplate">
    <StackPanel>
    <TextBlock Text="{Binding XPath=@ProductID}"/>
    <TextBlock Text="{Binding XPath=Cost}"/>
    <TextBlock Text="{Binding XPath=Description}"/>
    <CheckBox IsChecked="{Binding XPath=HotItem}"/>
    <TextBlock Text="{Binding XPath=Name}"/>
    </StackPanel>
    </DataTemplate>
    </Window.Resources>
    <Grid>
    <ListBox HorizontalAlignment="Left"
    ItemTemplate="{DynamicResource ProductTemplate}"
    ItemsSource="{Binding XPath=/Inventory/Product}"
    Margin="89,65,0,77" Width="200"/>
    </Grid>
    my Xaml file:
    <Window x:Class="WpfXmlDataBinding.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="922" Width="874">
    <Window.Resources>
    <DataTemplate x:Key="ProductTemplate">
    <StackPanel>
    <TextBlock Text="{Binding XPath=@ProductID}"/>
    <TextBlock Text="{Binding XPath=Cost}"/>
    <TextBlock Text="{Binding XPath=Description}"/>
    <CheckBox IsChecked="{Binding XPath=HotItem}"/>
    <TextBlock Text="{Binding XPath=Name}"/>
    </StackPanel>
    </DataTemplate>
    </Window.Resources>
    <Grid DataContext="{Binding Source={StaticResource InventoryXmlDataStore}}">
    <ListBox HorizontalAlignment="Left" Height="370"
    ItemTemplate="{DynamicResource ProductTemplate}"
    ItemsSource="{Binding XPath=/Inventory/Product}"
    Margin="65,55,0,0" VerticalAlignment="Top" Width="270"/>     
        </Grid>
    </Window>
    All looks quite the same except the <XmlDataProvider ....> part under <Window.Resources>, which is gone completely in my Xaml file.
    1, Why?
    2, How many different ways to deal with xml data source through WPF?
    Thanks, guys.
    (ps My "WpfXmlDataBinding" runs without problem through.)

    Never do yourself down Richard.
    Leave that to other people.
    It's quite common for smart developers to think they're not as good as they are.
    I coach a fair bit and it's a surprisingly common feeling.
    And to repeat.
    Never use anything ends .. provider.  They're for trivial demo apps.  Transform xml into objects and use them.  Write it back as xml.  Preferably, use a database.
    You want to read a little mvvm theory first.
    http://en.wikipedia.org/wiki/Model_View_ViewModel
    Whatever you do, don't read Josh Smiths explanation.  I used to recommend it but it confuses the heck out newbies. Leave that until later.
    Laurent Bugnion did a great presentation at mix10.  Unfortunately that doesn't seem to be working on the MS site, but I have a copy.  Download and watch:
    http://1drv.ms/1IYxl3z
    I'm writing an article at the moment which is aimed at beginners.
    http://social.technet.microsoft.com/wiki/contents/articles/30564.wpf-uneventful-mvvm.aspx
    The sample is just a collection of techniques really.
    I have a sample which involves no real data but is intended to illustrate some aspects of how viewmodels "do stuff" and how you use datatemplates to generate UI.
    I can't remember if I recommended it previously to you:
    https://gallery.technet.microsoft.com/WPF-Dialler-simulator-d782db17
    And I have working samples which are aimed at illustrating line of business architecture.  This is an incomplete step by step series but I  think more than enough to chew on once you've done the previous stuff.
    http://social.technet.microsoft.com/wiki/contents/articles/28209.wpf-entity-framework-mvvm-walk-through-1.aspx
    The write up for step2 is work in progress.
    https://gallery.technet.microsoft.com/WPF-Entity-Framework-MVVM-78cdc204
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

Maybe you are looking for

  • How to generate formated (defined position) text and image using pl/sql and

    Hello, I need to use pl/sql to create a dynamic html page (or image , if possible) with defined positions for text and bar code. It is necessary because the page will be printed and it should be able to be read by one other process , OCR, that needs

  • Signing in to this forum

    I think I used to be able to sign in and come straight to this forum. Now I have to go to the general Discussions, pick OS X>Using Mac OS X. Is there any easier way? My bookmark takes me to this forum, but once I sign in, I'm kicked back. Thanks, All

  • [Solved] How to install yajl 2.0 and reinstall yaourt?

    I had yaourt with yajl 1.0, but somehow got deleted. My fault. I had used yaourt, even if it asked for yajl>=2.0 and installed packages from AUR. Now I cannot install yaourt, as it asks for yajl>=2.0 I can only install yajl 1.0.11-3, as pacman/kpacka

  • Insufficient space on SD card

    Hi, I'm trying to copy a load of images (over a thousand) to a micro SD card that I use in an LCD frame. There is sufficient capacity on the card (ie the folder is smaller in size than the just under 2Gb that Finder says exists on the card) but Finde

  • Transport for SCAL 'factory calender' or administer SCAL in prod system?

    Hi togehther, we could change the factory calender in the development system and afterwords transport this changes by using a transport request and STMS. But our Consultants recommend not to transport these changes. They recommend to open the prod Sy