|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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> |
|
#2
|
|||
|
|||
|
<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. |
|
#3
|
||||
|
||||
|
Quote:
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > 2 XML Data islands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|