Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to display info from a xml in a html after searching

    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.

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by joltz View Post
    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.

    Edit: use code tags instead of quote for code, please

    best regards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •