XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 15th, 2004, 05:18 PM
mikerugged mikerugged is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 2 mikerugged User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
2 XML Data islands

Does anyone know how i can place 2 different external xml islands in the same html page? Im tyring to put the data in seperate tables, and the fist island works fine. However the second one is not. Please help asap...thanks!
ex. code....

<XML ID = "xmlDoc" SRC="info.xml">
</XML>
<H2> New Textbook Table </H2>


<TABLE BORDER ="3" DATASRC = "#xmlDoc">
<THEAD>
<TR>
<TH>Book Title</TH>
<TH>Author</TH>
<TH>Publisher</TH>
<TH>year</TH>
<TH>ISBN</TH>

</TR>
</THEAD>

<TR>

<TD> <SPAN DATAFLD = "Btitle"> </SPAN> </TD>
<TD> <SPAN DATAFLD = "Author"> </SPAN> </TD>
<TD> <SPAN DATAFLD = "Publisher"> </SPAN> </TD>
<TD> <SPAN DATAFLD = "year"> </SPAN> </TD>
<TD> <SPAN DATAFLD = "ISBN"> </SPAN> </TD>


</TR>

</TABLE>

//Below is where is goes bad

<H2> Library Bussiness Hours </H2>

<XML ID = "xmlDoc" SRC="library.xml"> //i know this is wrong
</XML>

<TABLE BORDER ="3" DATASRC = "#xmlDoc">
<THEAD>
<TR>
<TH>Monday</TH>
<TH>Tuesday</TH>
<TH>Wendsday</TH>
<TH>Thursday</TH>
<TH>Friday</TH>
<TH>Saturday</TH>
<TH>Sunday</TH>
</TR>
</THEAD>

<TR> //think these are wrong

<TD> <SPAN DATAFLD = "Monday"> </SPAN> </TD>
<TD> <SPAN DATAFLD = "Tuesday"> </SPAN> </TD>
<TD> <SPAN DATAFLD = "Wendsday"> </SPAN> </TD>
<TD> <SPAN DATAFLD = "Thursday"> </SPAN> </TD>
<TD> <SPAN DATAFLD = "Friday"> </SPAN> </TD>
<TD> <SPAN DATAFLD = "Saturday"> </SPAN> </TD>
<TD> <SPAN DATAFLD = "Sunday"> </SPAN> </TD>

Reply With Quote
  #2  
Old May 6th, 2004, 09:05 AM
wendra wendra is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Germany
Posts: 14 wendra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
<XML ID = "xmlDoc" SRC="info.xml">
</XML>
<H2> New Textbook Table </H2>


<TABLE BORDER ="3" DATASRC = "#xmlDoc">

This is OK.

<XML ID = "xmlDoc" SRC="library.xml"> //i know this is wrong
</XML>

<TABLE BORDER ="3" DATASRC = "#xmlDoc">

This is not OK. You have to rename the ID for the library.xml and place it in the DATASRC. But, I guess you have known that don't you?
And there might be a slight problem in your xml data.
Can you provide me your xml files? Or perhaps you can check your xml files on your own.
I've tried something with the xml data, it goes like this:

<?xml version="1.0" ?>
<datas>

<data>
<Monday>1</Monday>
<Tuesday>2</Tuesday>
<Wendsday>3</Wendsday>
<Thursday>4</Thursday>
<Friday>5</Friday>
<Saturday>6</Saturday>
<Sunday>7</Sunday>
</data>

<data>
<Monday>8</Monday>
<Tuesday>9</Tuesday>
<Wendsday>0</Wendsday>
<Thursday>1</Thursday>
<Friday>2</Friday>
<Saturday>3</Saturday>
<Sunday>4</Sunday>
</data>

<data>
<Monday>5</Monday>
<Tuesday>6</Tuesday>
<Wendsday>7</Wendsday>
<Thursday>8</Thursday>
<Friday>9</Friday>
<Saturday>0</Saturday>
<Sunday>1</Sunday>
</data>

</datas>

It is OK, it will work, but:

<?xml version="1.0" ?>
<datas>

<data0>
<Monday>1</Monday>
<Tuesday>2</Tuesday>
<Wendsday>3</Wendsday>
<Thursday>4</Thursday>
<Friday>5</Friday>
<Saturday>6</Saturday>
<Sunday>7</Sunday>
</data0>

<data1>
<Monday>8</Monday>
<Tuesday>9</Tuesday>
<Wendsday>0</Wendsday>
<Thursday>1</Thursday>
<Friday>2</Friday>
<Saturday>3</Saturday>
<Sunday>4</Sunday>
</data1>

<data2>
<Monday>5</Monday>
<Tuesday>6</Tuesday>
<Wendsday>7</Wendsday>
<Thursday>8</Thursday>
<Friday>9</Friday>
<Saturday>0</Saturday>
<Sunday>1</Sunday>
</data2>

</datas>

won't work. See the differences? I hope this will help your problem.

Last edited by wendra : May 7th, 2004 at 07:36 AM.

Reply With Quote
  #3  
Old May 6th, 2004, 10:31 AM
jlk's Avatar
jlk jlk is offline
Perl Jedi
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: New Hampshire
Posts: 109 jlk User rank is Sergeant (500 - 2000 Reputation Level)jlk User rank is Sergeant (500 - 2000 Reputation Level)jlk User rank is Sergeant (500 - 2000 Reputation Level)jlk User rank is Sergeant (500 - 2000 Reputation Level)jlk User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 24 sec
Reputation Power: 15
Quote:
Originally Posted by mikerugged
Does anyone know how i can place 2 different external xml islands in the same html page? Im tyring to put the data in seperate tables, and the fist island works fine. However the second one is not. Please help asap...thanks!
ex. code....

<XML ID = "xmlDoc" SRC="info.xml">
</XML>


<XML ID = "xmlDoc" SRC="library.xml"> //i know this is wrong
</XML>



Make sure that your data islands have different ID's. Here they are the same. If you change the ID, you should be fine.

Regards,

jlk

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > 2 XML Data islands


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT