Reply
XML Search Page
Old 07-04-2007, 05:08 AM XML Search Page
Junior Talker

Posts: 3
Name: Red Hope
Location: U.S.A.
I'm looking to develop a XML/HTML search page that I can place on my website. My website contains a lot of stories so I'd like to put general information into an XML file such as the stories' title, length, summary, and link. Then I'd like for my users to be able to come to my site, go to a search page or field where they can put in key words and search the XML file. Then if they get a return, the XML Query will give back an HTML page with the story's information and link.

Is something like that possible? Or is there a better way to do it? Any help would be awesome!
Thank you,
Red
redhope is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 07-04-2007, 09:56 AM Re: XML Search Page
LadynRed's Avatar
Super Moderator

Posts: 6,535
Location: Tennessee
Yes, it's possible,but not with HTML, you'll have to use some kind of scripting solution - like PHP or .NET - to achieve it.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 07-04-2007, 01:51 PM Re: XML Search Page
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,024
Name: Forrest Croce
Location: Seattle, WA
I think you could use an XSLT to do it natively in the browser. You'd have to send down the entire XML file, and write up a transform, stylesheet, and XPath query. I don't know how you'd get a variable in there from any kind of user input, though ... that might need some type of scripting, ideally server side. But modern browsers can do a lot with XML.
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 07-05-2007, 01:57 AM Re: XML Search Page
Junior Talker

Posts: 3
Name: Red Hope
Location: U.S.A.
I appreciate the help, y'all! That's what I was afraid of! The part about storing the information in an XML file is the easy part, but searching it and kicking it back as a HTML page is harder. I'm not sure what else to come up with because trying to do a site search would yield far too many results for my users. Bleh.

Red
redhope is offline
Reply With Quote
View Public Profile
 
Old 07-05-2007, 04:16 AM Re: XML Search Page
JeremyMiller's Avatar
Full-Time TeraTasker

Posts: 984
Name: Jeremy Miller
Location: Reno, NV
I'd recommend PHP 5 (fairly easy to learn) and parsing the XML so that you could output it. Not exactly the easiest project for a noob, though, so be prepared to do lots of reading. If you're talking about 1000's of files, it'd be prudent to index them in some fashion (say through a full index in MySQL).
__________________
Jeremy Miller - TeraTask Technologies, LLC
Content Farmer - Automated Posting for Content & Blog Sites
JeremyMiller is online now
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 07-05-2007, 09:34 PM Re: XML Search Page
Junior Talker

Posts: 3
Name: Red Hope
Location: U.S.A.
That's what I was thinking of doing. I know of a webmaster that already has basically what I want. She uses MySQL - ColdFusion - HTML/XML to get the job done. I suppose I can substitute the ColdFusion with PHP to do it...? Right now the files are only about 100, but later I may take on a larger project that'll be by the 1000's.
redhope is offline
Reply With Quote
View Public Profile
 
Old 07-05-2007, 10:03 PM Re: XML Search Page
JeremyMiller's Avatar
Full-Time TeraTasker

Posts: 984
Name: Jeremy Miller
Location: Reno, NV
ColdFusion would likely work. I don't know it, but I'm pretty sure it's a server side language, so you'd be good with it.
__________________
Jeremy Miller - TeraTask Technologies, LLC
Content Farmer - Automated Posting for Content & Blog Sites
JeremyMiller is online now
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 07-06-2007, 06:26 PM Re: XML Search Page
jason_bristol's Avatar
Extreme Talker

Posts: 246
Name: Jason Eyermann
Location: england bristol
Try checking whether your server (if remote) has a cgi script that can you with that. That's what I use on one of my sites. (although the results page looks horrible) mintinit.com
__________________
My Site/Blog - AspireCreate.com
jason_bristol is offline
Reply With Quote
View Public Profile Visit jason_bristol's homepage!
 
Reply     « Reply to XML Search Page
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.16177 seconds with 12 queries