Jump to content

Getting Data from XMLGet


houssam_ballout

Recommended Posts

Hello all,Can someone helps me with the following idea:I've a page with input boxes on it,and beside each input box there is a link that will display a small help text, and that help text will be extracted from the xml file according to the id of the text box, so , I need more help on that , How could i extract data in HTML page from an xml page?Thanks

Link to comment
Share on other sites

If you aren't using a server-side language, then you're probably stuck using AJAX. If the file from which you want to get the data is an XML file, you can use AJAX to send a GET request to your web server to get that XML file. Once the response comes back, the XMLHttpRequest will have two ways to get at the data: .responseText and .responseXML. .responseText returns the data as plain text whereas, if the content-type of the data is "text/xml", .responseXML returns an XML document. With that XML document, you can use your favorite means of getting the data - I have been typically using the XML DOM in my projects.AJAX TutorialXML DOM Tutorial

Link to comment
Share on other sites

  • 3 weeks later...

Jesh is right. But here's the short version:The short version is that you create a pop-up, and that pop-up includes the xml file:

<xml id="note" src="note.xml"></xml>

There are numerous types of pop ups. Look to javascripts to make the desired type.Bonus question: Are there ways to create popups in PHP?

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
×
×
  • Create New...