LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   how to create an html object from an XML document (https://www.linuxquestions.org/questions/programming-9/how-to-create-an-html-object-from-an-xml-document-608013/)

mohtasham1983 12-19-2007 10:24 PM

how to create an html object from an XML document
 
Hi,

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.

Thank,

j-ray 12-20-2007 02:31 AM

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
j

mohtasham1983 12-20-2007 02:58 AM

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.


All times are GMT -5. The time now is 12:50 PM.