Jump to content

How to get elements from xml and view in new html


hainhim

Recommended Posts

Hi everybody!First, sorry about my EnglishI have a midi.xml file:

<?xml version="1.0"?><Midi>		<ABC name="a">		<DEF name="n">			<ID id="125">	  		    <Title>Angel</Title>			    <Composer>Steven Tyler and Desmond Child</Composer>			    <Perform>Aerosmith</Perform>			    <Url><a href="http://example.com/Angel-Aerosmith.mid">Download</a></Url>			</ID>			<ID id="126">			    <Title>Another Day</Title>			    <Composer>Jonathan Larson</Composer>			    <Perform>Rent</Perform>			    <Url><a href="http://example.com/AnotherDay-Rent.mid">Download</a></Url>			</ID>		</DEF>		</ABC></Midi>

In my html:<html><head><title>My Midi</title></head><body>Angel<br>Another Day</body></html>How to when someone click on the Angel (or Another Day)will get Angel's elements (or Another Day's elements) in midi.xml fileand send to new html (with any css file available)example (after click on Angel), the MidiDetail.html as:<html><head><title>Midi Detail</title></head><body>AngelComposed by Steven Tyler and Desmond ChildPerformed by AerosmithID: 125<a href="http://example.com/Angel-Aerosmith.mic">download</a></body></html>Because I'm really newbie,help me with example code, please.Thanks.

Link to comment
Share on other sites

try it for references http://www.w3schools.com/ajax/ajax_database.aspmaybe I will use PHP code to put xml contents (better if it live in a database) in to html file
Hi and Thanks for replying to my question.it's like http://www.w3schools.com/ajax/ajax_xmlfile.aspbut don't use drop down box.can i only use ajax and javascript (don't use php)?Then, get elements to new html (like www.4shared.com)liệu viết tiếng Việt trên forum này được không?
Link to comment
Share on other sites

Hi and Thanks for replying to my question.it's like http://www.w3schools.com/ajax/ajax_xmlfile.aspbut don't use drop down box.can i only use ajax and javascript (don't use php)?Then, get elements to new html (like www.4shared.com)liệu viết tiếng Việt trên forum này được không?
R u using java or .net(any language C#, VB) behind web-page ???if yes than I suggest go for parser- parser XML file get elements and than you are to display anywhere in anyformat.even you can use in PHP than.for java parser are DOM and SAX for .net you have to google.
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...