Jump to content
  • Advertisement
Sign in to follow this  
I Like Bread

[web] XML database thingy.

This topic is 4901 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a support section for my page. I figured I needed a faster solution than simply linking a whole bunch of pages, and also I was planning on having a Search function and the ability to organize columns (by date, user rating, et cetera). So, I made an XML file with all the vital info and am now looking for a way to parse this data into an HTML page. I would basically need to: - Display a table of data with multiple columns - Give the user the ability to rearrange data in ascending or descending order - Allow users, upon visiting the support links, be able to change the user rating (and also add to Times Visited) Can anyone tell me the next step? Am I headed in the wrong direction?

Share this post


Link to post
Share on other sites
Advertisement
Assuming you have the ability to use server-side scripting, the fastest and probably best solution to this would be to use XSLT and pass parameters to the stylesheet transform based on the user entered values.

The second part would involve you using the XML DOM to search for a node, replace the value and resave the XML file. You'll probably have to perform some application-level locking system to ensure that two people rating at the same time doesn't cause the app to fall over or have one of the ratings ignored.

Which server-side scripting system are you using? This would be relatively simple in ASP, I don't know about PHP - but I'm sure it can be done.

Share this post


Link to post
Share on other sites
Hmm, I see. Yeah, there's plenty of ASP documentation around. Well-- We have Visual Studio .NET on all the computers here, but I've been avoiding it like the plague. I was hoping I could just make an XML file and use javascript to display the data in a table any way I wanted. Looks like ASP is the "easy" way out. Thanks!

Share this post


Link to post
Share on other sites
Depending on what browser you are targeting you can do just that. Many modern browsers support XLST processing. Try loading the XML in an iframe on the page and have the browser take care of the processing. Not the most friendly and accesible way, but it works [smile]

See: W3Schools XLST tutorials

Share this post


Link to post
Share on other sites
Ah - well it *is* possible and in fact myself and jollyjeffers came up with a similar solution in this thread. I've also done some work to try and make it cross-platform, but apparently it forces IE into the 'untrusted' security zone because of the ActiveX usage. Check out the demo I linked, Jack has made it into something really special actually. The basic concept is the same, you're just doing the processing client-side.

Share this post


Link to post
Share on other sites
Thanks for your help, guys. RATING++

I found my solution at www.activewidgets.com. There's a tutorial there that covers everything about manipulating XML data with javascript. It also provides steps for JS arrays and plain-text delimited data. Pretty damn versatile in other ways, too. I figured I'd share, since I ran a Google search on the stuff you guys mentioned.

edited by evolutional to activate the link

Share this post


Link to post
Share on other sites
Thanks for the link. I'm going to put it in the FAQ in the next update which will have links about XML and javascript. [smile]

Share this post


Link to post
Share on other sites
Quote:
Original post by I Like Bread
You might as well add This page. At the bottom is a code snippet for writing to an XML file. It doesn't appear to have any ActiveX control in it.


Part of the source contains var xyz = ActiveXObject ("Scripting.FileSystemObject");. In IE, it's the 'ActiveXObject' call that often flags security concerns, especially now under SP2. Anything capable of reading or writing to a local file will be put into the 'danger' zone and the user will have to explicitly allow the site to do what it's supposed to do.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!