Jump to content

Adding Xml To Html Page


sairfan1

Recommended Posts

You cannot have a section of XML embedded in the middle of an ordinary HTML document. This will happen in the future, but not right now.You can use AJAX to download an XML document, and the document will be transformed into an XML DOM object. This will allow you to use DOM methods to access data in the XML object. It is also possible to transform serialized XML into an XML object. This way, you can embed XML in your document as a string object, and then transform it. Either way, the XML is a source of JavaScript data, not page structures. You would have to manipulate page elements in addition to the XML data harvesting.If you want XML to be rendered directly as XHTML, you might investigate XSL. There is a steep learning curve to this stuff.

Link to comment
Share on other sites

Thanks for reply, in fact i created an object with javascript, i want my php page to come with data based on user query dynamically, it cant save a xml file each time, i want to include xml code within html, there is an other way to create a string variable and then assign to xml object. is there any other method??thanks

You cannot have a section of XML embedded in the middle of an ordinary HTML document. This will happen in the future, but not right now.You can use AJAX to download an XML document, and the document will be transformed into an XML DOM object. This will allow you to use DOM methods to access data in the XML object. It is also possible to transform serialized XML into an XML object. This way, you can embed XML in your document as a string object, and then transform it. Either way, the XML is a source of JavaScript data, not page structures. You would have to manipulate page elements in addition to the XML data harvesting.If you want XML to be rendered directly as XHTML, you might investigate XSL. There is a steep learning curve to this stuff.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...