Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

GhostDZ9

macrumors regular
Original poster
Sep 13, 2010
118
0
Hey guys,

I'm creating a news update part to my CMS and I was wondering is it possible to have users enter there information into an html form, the info that they entered is then translated into an XML document which can later be parsed using jQuery and displayed on the site?

if there is a way to do this can you please let me know?
 
Yes. You can do that. Just take the user input and convert it into a valid xml document. How you go about this exactly will depend on the server side technology you are using, although most languages have a library (often built in) with good support for xml parsing/writing.
 
what I meant by that was can it be done automatically? if so how do i do this?
 
what I meant by that was can it be done automatically? if so how do i do this?

elppa actually answered your question as far as it can be answered given the information you have provided. How you go about this is dependent on your server-side technologies...

For example, if you can use PHP on your server, google "PHP, save as XML" and you will find a handful of tutorials. The link below looked pretty good:

http://www.dynamicdrive.com/forums/showthread.php?t=14165

you already mentioned JQuery. You can also use that to format and prepare your XML, then save it via PHP.

Of course, if you have a CMS already, why are you saving files to disk? It would be better to use your CMS's API and save this content into a database table.
 
I am programming my own CMS, I'm doing this all using local host on mac, I'm aware of how to do via PHP but i was just wondering if you can do it from html to XML directly without having to use PHP
 
I am programming my own CMS, I'm doing this all using local host on mac, I'm aware of how to do via PHP but i was just wondering if you can do it from html to XML directly without having to use PHP

no..well technically yes, you don't have to use php, BUT you do have to process it somehow.

Though it doesn't return xml, the closest thing to automatic processing is probably using PHP's json_encode function.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.