...

View Full Version : How to display info from a xml in a html after searching



joltz
02-16-2009, 04:56 AM
Hi guys,

Im working on a small project, basically what im doing, is im making a XML file and im using it as a contact list, see below:


<employee id="100">
<planttech>2000</planttech>
<Name>Mr John Citizen</Name>
<mobile>0111 222 333</mobile>
<region>Central Coast</region>
<mobile2></mobile2>
<mobile3></mobile3>
<Landline></Landline>
<Fax></Fax>
<AHProcess>SMS</AHProcess>
<TL>Mr John Supervisor</TL>
<TLMobile>0222 333 444</TLMobile>
<SendSMS><a href="mailto:0111222333@network.com">Click to SMS</a></p></SendSMS>
<AdditionalInfo>Currently available 24H7D</AdditionalInfo>
</employee>

So what Im having problems now is I want to display this data in a html page, when 2 entries are searched.

So for example, the html page needs 2 data entry boxes, one which searchs the employee number and the other searches the planttech number. When succesful, it matches all the data for that employee in the xml file and it should show all the details, maybe in another text box which populates on the page or just on the page as basic html.

Im not sure how to do this and Im pretty sure it is quite simple and basic, but everywhere I look I just cant seem to find what I need, does anyone have any code I can play with to make this work?
Id greatly appreciate any help I can get. Many thanks.

oesxyl
02-16-2009, 09:29 AM
Hi guys,

Im working on a small project, basically what im doing, is im making a XML file and im using it as a contact list, see below:



So what Im having problems now is I want to display this data in a html page, when 2 entries are searched.

So for example, the html page needs 2 data entry boxes, one which searchs the employee number and the other searches the planttech number. When succesful, it matches all the data for that employee in the xml file and it should show all the details, maybe in another text box which populates on the page or just on the page as basic html.

Im not sure how to do this and Im pretty sure it is quite simple and basic, but everywhere I look I just cant seem to find what I need, does anyone have any code I can play with to make this work?
Id greatly appreciate any help I can get. Many thanks.
it's not simple and not basic, :)
You can retrive the data you need from xml using xpath but you must first build the forms, decide what server side language you use, perl, php or other, how you build the xpath expression, how you retrive the results and how you put them in the page.

use code tags instead of quote for code, please
best regards



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum