Solved

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

Posted on 2004-09-13
14
281 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

 
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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

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…
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

695 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