Domain: progressivepublishing.com
Stories and comments across the archive that link to progressivepublishing.com.
Comments · 11
-
XML in PHP
A lot of people do find XML quite scary, which is why a module was created that can be compiled into mod_php which has a non-threatening interface. It's quick, Open Source, and free to use for any purpose. A quick example of opening a config file, changing a value, and saving it again:
$xmldoc = xml_load("myconfig.xml");
xml_setelementvalue($xm ldoc, "server.httpd.domain", "localhost");
xml_output($xmldoc, "myconfig.xml");
There, that's not too scary is it? ;-)
Phillip. -
XML in PHP
A lot of people do find XML quite scary, which is why a module was created that can be compiled into mod_php which has a non-threatening interface. It's quick, Open Source, and free to use for any purpose. A quick example of opening a config file, changing a value, and saving it again:
$xmldoc = xml_load("myconfig.xml");
xml_setelementvalue($xm ldoc, "server.httpd.domain", "localhost");
xml_output($xmldoc, "myconfig.xml");
There, that's not too scary is it? ;-)
Phillip. -
There is XML module available
I too would love to see XML natively available for PHP. I've written a module that gives a nice simple API to XML, it's available here, but the problem is it needs to come with PHP as standard for it to become widely used.
Phillip. -
An XML module that has surely been missed...There is a PHP extension called XMLDOC (not a very good name, I know). It seems fast, though not yet tested under load, but its main advantage is its simple API.
Eg take example config file:<server>
The code to change the IP is:
<type>Apache</type>
<ip>127.0.0.1</ip>
</server>$xmldoc = load("config.xml");
Here is an example guestbook and its source.
xml_setelementvalue($xmldoc, "server.ip", "192.168.1.1");
xmloutput($xmldoc, "config.xml");
I wrote it for a client but it never got used, hence I made it public and freely available. I haven't had a chance to get on the PHP developers list and try and get it incorporated into the standard distro, but if enough people try it, like it, and email me... then I am prepared to put some effort into getting it put in place.
Phillip. -
An XML module that has surely been missed...There is a PHP extension called XMLDOC (not a very good name, I know). It seems fast, though not yet tested under load, but its main advantage is its simple API.
Eg take example config file:<server>
The code to change the IP is:
<type>Apache</type>
<ip>127.0.0.1</ip>
</server>$xmldoc = load("config.xml");
Here is an example guestbook and its source.
xml_setelementvalue($xmldoc, "server.ip", "192.168.1.1");
xmloutput($xmldoc, "config.xml");
I wrote it for a client but it never got used, hence I made it public and freely available. I haven't had a chance to get on the PHP developers list and try and get it incorporated into the standard distro, but if enough people try it, like it, and email me... then I am prepared to put some effort into getting it put in place.
Phillip. -
An XML module that has surely been missed...There is a PHP extension called XMLDOC (not a very good name, I know). It seems fast, though not yet tested under load, but its main advantage is its simple API.
Eg take example config file:<server>
The code to change the IP is:
<type>Apache</type>
<ip>127.0.0.1</ip>
</server>$xmldoc = load("config.xml");
Here is an example guestbook and its source.
xml_setelementvalue($xmldoc, "server.ip", "192.168.1.1");
xmloutput($xmldoc, "config.xml");
I wrote it for a client but it never got used, hence I made it public and freely available. I haven't had a chance to get on the PHP developers list and try and get it incorporated into the standard distro, but if enough people try it, like it, and email me... then I am prepared to put some effort into getting it put in place.
Phillip. -
An XML module that has surely been missed...There is a PHP extension called XMLDOC (not a very good name, I know). It seems fast, though not yet tested under load, but its main advantage is its simple API.
Eg take example config file:<server>
The code to change the IP is:
<type>Apache</type>
<ip>127.0.0.1</ip>
</server>$xmldoc = load("config.xml");
Here is an example guestbook and its source.
xml_setelementvalue($xmldoc, "server.ip", "192.168.1.1");
xmloutput($xmldoc, "config.xml");
I wrote it for a client but it never got used, hence I made it public and freely available. I haven't had a chance to get on the PHP developers list and try and get it incorporated into the standard distro, but if enough people try it, like it, and email me... then I am prepared to put some effort into getting it put in place.
Phillip. -
PHP and XML
If you want to use XML in PHP, then you may want to look here.
Phillip. -
PHP and XML
Now would be a good time to ask for beta testers of a new XML module for PHP. One thing that's been a big fault of nearly all PHP apps available is the storing of the configuration as a list of hard-coded variables (usually called config.php). This makes it difficult for the app to update its own config, and certainly reduces the chance of 3rd party config plug-ins.
There are a couple of xml modules that are veneers onto standard XML libraries, and also a good PHP Class, but all are not that easy to use. I wanted an API that took under 10 mins to learn and be competant in. You can see it here. So simple it only took me a couple of minutes to write a XML-based guestbook. Another example is here. Install instructions are on the site, feel free to have a try and give any feedback.
Phillip. -
PHP and XML
Now would be a good time to ask for beta testers of a new XML module for PHP. One thing that's been a big fault of nearly all PHP apps available is the storing of the configuration as a list of hard-coded variables (usually called config.php). This makes it difficult for the app to update its own config, and certainly reduces the chance of 3rd party config plug-ins.
There are a couple of xml modules that are veneers onto standard XML libraries, and also a good PHP Class, but all are not that easy to use. I wanted an API that took under 10 mins to learn and be competant in. You can see it here. So simple it only took me a couple of minutes to write a XML-based guestbook. Another example is here. Install instructions are on the site, feel free to have a try and give any feedback.
Phillip. -
Re:Artists
You mean a system that retro-fits into the current P2P distribution and MP3 format? That enables people to reward the artist directly cutting out the record label middle-man, whilst being reasonably fraud-resistant? Feel free to post your comments below on the following essay:
Peer-to-peer in profit. Feel free to copy it if you think it will give you an A.
Phillip.