PHP & XML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tomas

    PHP & XML

    Hello guys,

    I intend to write a (very) simple todo application using an XML file to
    store the details of each task. I wondered if anyone had any experience
    of using the various XML extensions in PHP 5, and could say which are
    more suited to reading AND writing XML, which are more likely to be
    present on more hosts, and which are easier to get to grips with, etc.

    The reason for this is a lack of database on my host and it seemed like
    a good thing to do. Alternatively, if anyone has any snippets
    of/recommendations for a lightweight, flat-file/XML, PHP todo list I'd
    be very grateful. I realise there are sites like tadalist.com but I had
    hoped to learn more about PHP as a result of the exercise!

    Apologies in advance if any of this is truly obvious.

    Cheers,
    Tom
  • Michael Fesser

    #2
    Re: PHP & XML

    ..oO(tomas)
    >I intend to write a (very) simple todo application using an XML file to
    >store the details of each task. I wondered if anyone had any experience
    >of using the various XML extensions in PHP 5, and could say which are
    >more suited to reading AND writing XML, which are more likely to be
    >present on more hosts, and which are easier to get to grips with, etc.
    DOM
    SimpleXML

    Micha

    Comment

    • Rik Wasmus

      #3
      Re: PHP & XML

      On Tue, 20 May 2008 21:37:33 +0200, tomas <tomas@fictiona l.comwrote:
      Hello guys,
      >
      I intend to write a (very) simple todo application using an XML file to
      store the details of each task. I wondered if anyone had any experience
      of using the various XML extensions in PHP 5, and could say which are
      more suited to reading AND writing XML, which are more likely to be
      present on more hosts, and which are easier to get to grips with, etc.
      >
      The reason for this is a lack of database on my host and it seemed like
      a good thing to do. Alternatively, if anyone has any snippets
      of/recommendations for a lightweight, flat-file/XML, PHP todo list I'd
      be very grateful. I realise there are sites like tadalist.com but I had
      hoped to learn more about PHP as a result of the exercise!
      >
      Apologies in advance if any of this is truly obvious.
      As Micha stated. However, why are you planning to use XML? Are there other
      apps running that might need it's info? If not, and you want to avoid
      setting up a real database, might I suggest SQLite?
      --
      Rik Wasmus
      ....spamrun finished

      Comment

      • tomas

        #4
        Re: PHP &amp; XML

        Michael Fesser wrote:
        .oO(tomas)
        >
        >I intend to write a (very) simple todo application using an XML file to
        >store the details of each task. I wondered if anyone had any experience
        >of using the various XML extensions in PHP 5, and could say which are
        >more suited to reading AND writing XML, which are more likely to be
        >present on more hosts, and which are easier to get to grips with, etc.
        >
        DOM
        SimpleXML
        >
        Micha
        Thanks Micha, will take a look.

        Comment

        • tomas

          #5
          Re: PHP &amp; XML

          Rik Wasmus wrote:
          On Tue, 20 May 2008 21:37:33 +0200, tomas <tomas@fictiona l.comwrote:
          >
          >Hello guys,
          >>
          >I intend to write a (very) simple todo application using an XML file
          >to store the details of each task. I wondered if anyone had any
          >experience of using the various XML extensions in PHP 5, and could say
          >which are more suited to reading AND writing XML, which are more
          >likely to be present on more hosts, and which are easier to get to
          >grips with, etc.
          >>
          >The reason for this is a lack of database on my host and it seemed
          >like a good thing to do. Alternatively, if anyone has any snippets
          >of/recommendations for a lightweight, flat-file/XML, PHP todo list I'd
          >be very grateful. I realise there are sites like tadalist.com but I
          >had hoped to learn more about PHP as a result of the exercise!
          >>
          >Apologies in advance if any of this is truly obvious.
          >
          As Micha stated. However, why are you planning to use XML? Are there
          other apps running that might need it's info? If not, and you want to
          avoid setting up a real database, might I suggest SQLite?
          Rik,

          I guess I was thinking about learning to deal with XML in case RSS came
          up in a future project. Also, though it might well be trivial on so
          simple an application, XML is more "organised" than flat-file and it
          made sense to be more organised for a todo app, even if it's only cosmetic!

          I know very little of SQLite -- will any PHP-enabled (with the
          appropriate extensions if any) server allow me to use an SQLite database
          file, though it lacks MySQL support?

          Many thanks,
          Tom

          Comment

          • notbob

            #6
            Re: PHP &amp; XML

            On 2008-05-20, tomas <tomas@fictiona l.comwrote:
            >
            I know very little of SQLite -- will any PHP-enabled (with the
            appropriate extensions if any) server allow me to use an SQLite database
            file, though it lacks MySQL support?
            Being so new to even html and php, I'm still trying to figure out the "why"
            of xml in general. If you're not using a db, why xml at all? BTW, it
            appears you are using a *nix OS. It's easy to load a db. I'm not really
            asking you a question, just adding my 2 cents worth of food for thought:



            nb

            Comment

            • roadman

              #7
              Re: PHP &amp; XML

              roadman wrote:
              There is a lot of XML chafe out there that does (like corba) need to be
              discarded. But there is a lot of exciting stuff yet to do, and to take
              advantage of. XML can do things still impossible with relational
              organization.
              Think of relational tables as miniature, columnar spread sheets,
              where one and only one column has a dominant role (the primary key)
              and all other column labels MUST modify the primary key at an
              equal level, else the data become ambiguous.

              Now think of relational tables transformed into miniature hierarchies.
              Now you can have a larger, more complex and richer set of modifiers,
              without loss of accuracy. The hierarchy defines who modifies what.

              A complex relational schema modeling a business, for instance, that
              might require 300 or more relational tables, can be modeled with perhaps
              20 or fewer hierarchies, with no increase in ambiguity.

              Comment

              • tomas

                #8
                Re: PHP &amp; XML

                notbob wrote:
                On 2008-05-20, tomas <tomas@fictiona l.comwrote:
                >I know very little of SQLite -- will any PHP-enabled (with the
                >appropriate extensions if any) server allow me to use an SQLite database
                >file, though it lacks MySQL support?
                >
                Being so new to even html and php, I'm still trying to figure out the "why"
                of xml in general. If you're not using a db, why xml at all? BTW, it
                appears you are using a *nix OS. It's easy to load a db. I'm not really
                asking you a question, just adding my 2 cents worth of food for thought:
                >

                >
                nb
                nb,

                I am using a *nix, but my current host isn't, and has no DB support -- I
                realise I can develop on a local server but that's only so useful once
                the thing's done (until I've saved some cash!) :-)

                I read the post from the link and many of the comments. It seems XML
                comes under fire for not being instantly human-readable, bloated almost.
                I do understand this point and given all I want to do for my todo list
                is read a task, a due date and whether it's done, a delimited flat file
                seems to be a simpler choice.

                Thanks for the $0.02!

                Tom

                Comment

                • notbob

                  #9
                  Re: PHP &amp; XML

                  On 2008-05-21, tomas <tomas@fictiona l.comwrote:
                  realise I can develop on a local server but that's only so useful once
                  the thing's done (until I've saved some cash!) :-)
                  I can relate, tomas, as I too am looking for a LAMP based web host I can
                  afford. Dig a little deeper and you will discover there are web hosts out
                  there that bill monthly instead of 1-2yr contracts and some even accept
                  paypal.

                  nb

                  Comment

                  • roadman

                    #10
                    Re: PHP &amp; XML

                    notbob wrote:
                    On 2008-05-21, tomas <tomas@fictiona l.comwrote:
                    >realise I can develop on a local server but that's only so useful once
                    >the thing's done (until I've saved some cash!) :-)
                    >
                    I can relate, tomas, as I too am looking for a LAMP based web host I can
                    afford. Dig a little deeper and you will discover there are web hosts out
                    there that bill monthly instead of 1-2yr contracts and some even accept
                    paypal.
                    >
                    nb
                    30 bucks or so a month gets a virtual dedicated host at godaddy.com
                    Then all you need is one partner and it's affordable.
                    And then you can install any software you want.

                    The performance I get that way is snappier than any shared host
                    I ever used.....not sure that will always be the case. But it has
                    been for 3-4 months now.


                    Comment

                    • Jerry Stuckle

                      #11
                      Re: PHP &amp; XML

                      roadman wrote:
                      notbob wrote:
                      >On 2008-05-21, tomas <tomas@fictiona l.comwrote:
                      >>realise I can develop on a local server but that's only so useful
                      >>once the thing's done (until I've saved some cash!) :-)
                      >>
                      >I can relate, tomas, as I too am looking for a LAMP based web host I can
                      >afford. Dig a little deeper and you will discover there are web hosts
                      >out
                      >there that bill monthly instead of 1-2yr contracts and some even accept
                      >paypal.
                      >nb
                      >
                      30 bucks or so a month gets a virtual dedicated host at godaddy.com
                      Then all you need is one partner and it's affordable.
                      And then you can install any software you want.
                      >
                      The performance I get that way is snappier than any shared host
                      I ever used.....not sure that will always be the case. But it has
                      been for 3-4 months now.
                      >
                      >
                      $20/mo. gets you a vps at jvds.com...

                      --
                      =============== ===
                      Remove the "x" from my email address
                      Jerry Stuckle
                      JDS Computer Training Corp.
                      jstucklex@attgl obal.net
                      =============== ===

                      Comment

                      Working...