Jump to content

Adding Xml To Html Page


sairfan1
 Share

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.

Edited by Deirdre's Dad
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...