Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 284
  • Last Modified:

Edit XML content (add/remove/modify/rearrange) with PHP

I use XML to provide content for my flash work - menus, content text fields, image galleries - and my clients are not usually familiar with modifying XML/HTML code. I'm wanting to create a page which would pull the XML content in, populating text fields laid out in the same structure as the XML page, allowing editing (adding/removing/modifying/rearranging) of the content, and saving - using PHP as the backend. I'm just learning PHP , but I know it can accomplish what I'm needing. Sort of an "admin" page for my users...

Can anyone point me in the right direction, please?
0
bchalker
Asked:
bchalker
  • 5
  • 4
  • 3
1 Solution
 
dualsoulCommented:
hm...i think you can use Sablotron XSLT engine to render XML content as HTML - for editing.
And write some PHP code to capture user input and build new XML contet.

Or do you mean something else?
0
 
bchalkerAuthor Commented:
thanks...I hadn't heard of Sablotron. Actually to clarify, I would want it to be a browser-based editor for the XML. I'll read up on Sablotron
0
 
wadalhagCommented:
Hi bchalker
You can use XForms  which basically will enable you to create a forms to be used by you clients then you can either use the forms to create or edit existing XML documents.
http://www.w3.org/MarkUp/Forms/

it’s a new technology with great potential as more people want their forms to be stored as XML
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
dualsoulCommented:
>I would want it to be a browser-based editor for the XML.

you mean you want client-side transforming of XML?
or just control the document via browser?
0
 
bchalkerAuthor Commented:
An XForm-based solution may be perfect. I've still got a lot to learn about XML, but it's by far the most efficient and convienient means of displaying content in Flash...

Wadalhag...do you know of anyone using the XForms?

dualsoul...client-side. Currently I just pass the commented XML doc to them, but I have several who aren't exactly "strict" in their editing ;)
0
 
wadalhagCommented:
Certainly. I use XForms to update number of XML documents which later on transformed to topicmaps. I did search a lot for another interface but this seems to be the best.
As alternative you can do the following:
1- use normal web form and then store the result in a database
2- use the XSLT Saxon transformation engine to create XML documents using the SQL functionality http://saxon.sourceforge.net/saxon7.8/sql-extension.html
This will enable you to produce XML or HTML files
3- Process your XML as usual  


 
0
 
bchalkerAuthor Commented:
I don't use the XML w/a database, so would the XForms be less of a benefit because of that?
0
 
wadalhagCommented:
The database is an alternative solutions, but if you decide to go ahead with XForms you shouldn’t have
0
 
bchalkerAuthor Commented:
thanks...are there any tutorials on actually using the XForms from beingning to end?
0
 
wadalhagCommented:
This is a short and well constructed tutorial
http://www.w3schools.com/xforms/default.asp

however I advice you to do a bet of work on some basic XML before you start with XForms
http://www.w3schools.com/xml/default.asp
0
 
dualsoulCommented:
hm...never worked with XForms - what the advantages they offer?

why it's better then using HTML forms with XMLServer ?
0
 
wadalhagCommented:
Xforms recomended by the w3c and they save data directly to the XML
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 5
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now