Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-19-2007, 10:24 PM   #1
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Rep: Reputation: 30
Smile how to create an html object from an XML document


I have an XML document which contain some data. What I want to do with it is to create an object which shows the xml data in a table so that when other people copy and paste the object code to their web page, say myspace,they can see the exact table from the object. I'm looking for something similar to embeding youtube videos.

I googled for that but I even couldn't find what technology I have to use to define my object using PHP. I would be glad if you give me some hints so that I can search more efficient.

My second question was about designing a web page which consists of multiple objects similar to the one I described above. I'm still in design process and each page will contain different data from multiple xml files. For example, suppose that the home page should contain five tables (table1,table2, ... ,table5) with different appearances and data and each table uses data inside an associated xml file. So what I was thinking was to transfer each of those xmls file to html and construct a table and then place the created table into an object.

Designing a page in this way seems to be the easiest way, since you create each part of the page as an object and then embed each object to your page. Moreover, other people also will be enabled to have access to some of the functions in the website. I'm just not sure what is the performance like, by implementing such method.

I would like to mention that I'm not looking for SOAP, since other people need to have SOAP client on their machines if they want to have access to data in my website.

I'm very sorry for long story. This idea of creating objects just came to my mind, and I got really excited about it, but I have no clue what to look for.

Old 12-20-2007, 02:31 AM   #2
Senior Member
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,550

Rep: Reputation: 136Reputation: 136
object code on a website? you can copy and paste html source code, no problem. you can transform dynamically created xml files to whatever using xslt but probably you wont need that. make tables with absolute urls to images and videos displayed and linked there so anyone can copy and paste the source html. its html. if you read the data dynamically out of xml files, databases or growing directories you may use php for that...
have fun
Old 12-20-2007, 02:58 AM   #3
Registered: Apr 2005
Location: San Jose
Distribution: Fedora 3,4- Ubuntu 6.06 to 8.10, Gentoo and Arch
Posts: 408

Original Poster
Rep: Reputation: 30
Basically I'm having the following problem right now.

I have a home page file which consists of several tables. To show all tables I construct an xml document for each table and associate it to an xsl document. For my home page I have a special XSL file which includes xsl files associate to each particular xml file whenever I want to add a new table.

By this way, my coding part will be completely separate from the presentation part. I'm not sure if this method be efficient though. The reason I'm not working in a framework is that I have already made a lot of code and learning a framework requires a lot of time and it's very hard to integrate your own functions to them.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
XSLT transformation of XML document using XMLNS Foomajick Programming 7 10-25-2006 05:27 AM
Help!Write xml document with shell scripts wmh830621 Programming 4 08-11-2006 04:55 AM
C++ 'XML to object' libraries Orkie Programming 5 04-02-2006 03:11 AM
how do i create a document, then a directory and save the document in it. jtdodge Linux - Newbie 9 06-15-2005 11:03 AM
Reading a xml document: amirspl Programming 3 09-10-2003 07:51 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration