Jump to content

[SOLVED] XML Question


Alex-Grim

Recommended Posts

I'm not really used to working with php yet, or xml, so this is a new topic to me. I wrote a script that uses the php simpleXMLElement() class to update my rss feed when i write a new topic on my site. All it does, is load the rss file, and append a new item to it, and write it back to disk. It's works great, i love having this function! The problem is that when i uploaded it to my host (Godaddy.com), it stopped working, claiming that i am calling a non existant class. I called them and they claim that that means that  i have a script error, but i know better: It means that they don't support it.

 

So, that leads me to my question. What is the most COMMON method used to manipulate xml in php? I've been doing a little homework, and have seen the xmlReader and xmlWriter and DomXml classes, but they are a little advanced, and not readily understood. Hell, i don't even know if they're even capable of doing what i'm trying to do. I'd prefer something simple (if there is something more simple than simpleXML! I love this thing), because i'm still new, but whatever will work, will work for me. ;)

 

Btw, just in case I'M wrong, here's the error:

Fatal error: Cannot instantiate non-existent class: simplexmlelement in /var/www/...

 

Thanx

Link to comment
Share on other sites

From what I understand (which about SimpleXML is basically nothing), SimpleXML is PHP5 only....

 

What version of PHP does your host use?

 

And, if it's not php5, sometimes hosts offer the ability to use multiple versions of PHP....  If you make a file called <something>.php5, does it parse?  (It may not be done by default, but I've seen a few hosts where it is.)

 

If you're using PHP5, it might just be disabled....

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.