Assistance please with getting pages to talk to each other

Discussion in 'XML' started by mwschenckCRL, Oct 27, 2006.

  1. mwschenckCRL

    mwschenckCRL Guest

    I have an HTML, XML, and Javascript file.

    I need the HTML page when accessed to display what ever is in the XML
    file.


    I have these files zipped that I can send, or please look at the
    snippet below.


    what should display on the HTML page in a table is

    name 1
    name 2

    this wont because it is personal and private
    personal 1



    Thank you
    =====================

    <html>
    <!-- Load our XML utilities for data islands and templates -->
    <head><script src="xml.js"></script></head>
    <!-- Expand all templates on document load -->
    <body onload="XML.expandTemplates()">

    <!-- This is an XML data island with our data -->
    <xml id="data" style="display:none"> <!-- hidden with CSS -->
    <contacts>
    <contact name="name 1"><email></email></contact>
    <contact name="name 2"><email></email></contact>
    <contact name="name 3"><email></email></contact>
    </contacts>
    </xml>

    <!-- These are just regular HTML elements -->
    <table>
    <tr><th>Name</th><th>Address</th></tr>
    <!-- This is a template. Data comes from the data island with id
    "data". -->
    <!-- The template will be expanded and copied once for each <contact>
    tag -->
    <tr datasource="#data" foreach="//contact">
    <!-- The "name" attribute of the <contact> is inserted into this
    element -->
    <td data="@name"></td>
    <!-- The content of the <email> child of the <contact> goes in here -->
    <td data="email"></td>
    </tr> <!-- end of the template -->
    </table>
    </body>
    </html>


    <?xml version="1.0"?>
    <contacts>
    <contact name="name 1"><email></email></contact>
    <contact name="name 2"><email></email></contact>
    <contact name="personal 1"
    Personal="true"><email></email></contact>
    </contacts>
    mwschenckCRL, Oct 27, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Leithead

    Advice Needed: Three Web controls talk to each other?

    George Leithead, Jun 28, 2006, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    187
    George Leithead
    Jul 12, 2006
  2. M.L.
    Replies:
    1
    Views:
    80
    Tim Williams
    Jul 17, 2005
  3. M. Strobel
    Replies:
    1
    Views:
    206
    The Natural Philosopher
    Mar 5, 2013
  4. Thomas 'PointedEars' Lahn

    Re: getting perl and php to talk to each other

    Thomas 'PointedEars' Lahn, Mar 5, 2013, in forum: Perl Misc
    Replies:
    7
    Views:
    247
    Scott Johnson
    Mar 14, 2013
  5. SwissCheese
    Replies:
    2
    Views:
    280
    Thomas 'PointedEars' Lahn
    Mar 18, 2013
Loading...

Share This Page