SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: XML based CMS

  1. #1
    SitePoint Zealot pnathan's Avatar
    Join Date
    Sep 2001
    Location
    Amsterdam
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XML based CMS

    OK, I have developed a cool Content Management System using PHP and MySQL. Now because I want to fill my brain full of XML/XSLT related info, I want to do the same using those technologies.

    I know how to Parse a XML and XSLT file using PHP. Now I want to store the data in XML.

    Basically the user enters details in a web form, this data gets entered in a XML document and then the data gets published using XSLT and the PHP Parser.

    I need to know how to get the turn the data from the user enters into an XML document. Anybody have any ideas?

    Thanks.
    I have two tickets to the Crows, sweet.

  2. #2
    SitePoint Wizard wdmny's Avatar
    Join Date
    Jul 2000
    Location
    Here
    Posts
    1,010
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am thinking of doing the same thing using ASP. Basically storing the actual articles in XML, then the management in a DB. All you really need to do is build an XSL file to format your XML, then from PHP have it proccess the XML file with the XSL file you created. Check TopXML or W3Schools for more code examples in your language.

    A problem I am considering is how to handle user defined templates.

  3. #3
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've written a CMS (Content Management System), and am looking to implement this too (in ASP too). My current approach is to have the fields defined within the template as "<% FIELDNAME %>" and then use a RegEx replace to fill in those field placeholders with the real data retrieved from the DB.

    pnathan, do I understand correctly that you want to store the user-entered data in one (or many) XML file(s), or is it just the template that must be XML???

    In terms of turning user-entered data into and XML file, you could easily turn posted form data into a static XML file (something like "<FIELDNAME>Data goes here</FIELDNAME>"). What is the specific problem you are having?


    M@rco

  4. #4
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wes DeMoney, how are you storing those articles? In an actual XML file, or a database?

    I understand how to create XHTML using XML and XSLT, but I don't see a good way to turn data from a database to XML files, especially when you want a tree structure.
    Work smarter, not harder. -Scrooge McDuck

  5. #5
    SitePoint Wizard wdmny's Avatar
    Join Date
    Jul 2000
    Location
    Here
    Posts
    1,010
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was planning on storing all the content in XML files, and keeping them entirely out of the database. The database is only needed to maintain info on the XML files, such as ID, etc...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •