Solved

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

Posted on 2004-09-13
14
280 Views
Last Modified: 2008-02-01
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
Comment
Question by:bchalker
  • 5
  • 4
  • 3
14 Comments
 
LVL 15

Expert Comment

by:dualsoul
ID: 12043383
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
 

Author Comment

by:bchalker
ID: 12043454
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
 
LVL 3

Expert Comment

by:wadalhag
ID: 12043707
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 15

Expert Comment

by:dualsoul
ID: 12044132
>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
 

Author Comment

by:bchalker
ID: 12044325
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
 
LVL 3

Expert Comment

by:wadalhag
ID: 12044525
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
 

Author Comment

by:bchalker
ID: 12044706
I don't use the XML w/a database, so would the XForms be less of a benefit because of that?
0
 
LVL 3

Expert Comment

by:wadalhag
ID: 12046204
The database is an alternative solutions, but if you decide to go ahead with XForms you shouldn’t have
0
 

Author Comment

by:bchalker
ID: 12046279
thanks...are there any tutorials on actually using the XForms from beingning to end?
0
 
LVL 3

Accepted Solution

by:
wadalhag earned 500 total points
ID: 12046347
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
 
LVL 15

Expert Comment

by:dualsoul
ID: 12047350
hm...never worked with XForms - what the advantages they offer?

why it's better then using HTML forms with XMLServer ?
0
 
LVL 3

Expert Comment

by:wadalhag
ID: 12047409
Xforms recomended by the w3c and they save data directly to the XML
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question