Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-09-13
14
Medium Priority
?
282 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Integration Management Part 2
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month10 days, 16 hours left to enroll

885 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