Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 23rd, 2005, 02:50 AM
Registered User
 
Join Date: Jun 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default About HTML and XML

Hi guys
i am the new learner of PHP in last 8 days i really realize that the its easy well suit but i not much familiar about the HTML and XML .i want develope my web pages in the XML .But i not know how to start can u guide me


ok bye soon meet
sachinkumar:)

s.b.durge
 
Old June 28th, 2005, 10:30 AM
Authorized User
 
Join Date: May 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This probably won't work but if it does - be amazed!

Put the below code into an xml file called test.xml

<?xml version="1.0" ?>
<!DOCTYPE PERSONS [
  <!ELEMENT PERSONS (ITEM+)>
  <!ELEMENT ITEM (TITLE, PERSON)>
  <!ELEMENT TITLE (#PCDATA)>
  <!ELEMENT PERSON (NAME*)>
  <!ELEMENT NAME (#PCDATA)>
]>

<PERSONS>
     <ITEM>
          <TITLE>Hege Refsnes </TITLE>
          <PERSON>
             <NAME>Martin</NAME>
             <NAME>Williams</NAME>
             <NAME>Cheryl</NAME>
             <NAME>Caprialdi</NAME>
          </PERSON>
     </ITEM>
</PERSONS>

Now create a html file with this in:
<HTML>
<BODY>
<XML ID="dsoBookList" SRC="test.xml"></XML>

<TABLE DATASRC="#dsoBookList" border="1" CELLSPACING=0 WIDTH=100%>
<THEAD>
<TR>
     <TH ALIGN="LEFT">Title
     </TH>
     <TH ALIGN="LEFT">Author(s)
     </TH>
</TR>
</THEAD>
<TBODY>
<TR>
     <TD valign="top"><SPAN DATAFLD="TITLE"></SPAN>&nbsp;</TD>
          <TD>
               <TABLE DATASRC="#dsoBookList" DATAFLD="PERSON" CELLSPACING=0>
                    <TBODY>
                         <TR>
                              <TD>
                                   <SPAN DATAFLD="NAME">
                                   </SPAN>&nbsp;
                              </TD>
                         </TR>
                    </TBODY>
               </TABLE>
          </TD>
     </TR>
</TBODY>
</TABLE>
</BODY>
</HTML>






Similar Threads
Thread Thread Starter Forum Replies Last Post
xml to html with xsl boblavinsky XSLT 4 January 5th, 2007 05:30 AM
Is XML supports transformation of HTML to XML? zeeonline XSLT 1 July 28th, 2006 05:13 PM
Html to XML stevoie XSLT 2 February 6th, 2006 12:37 PM
XML to HTML shoei78 XSLT 2 June 24th, 2003 08:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.