[PHP] Re: PHP5 XML functions

2003-12-30 Thread Aidan Lister
I wish, I'm interested as well :/

[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 I've just gotten PHP5 B3 working using the precompiled binaries under Win
XP,
 but the dom xml functions of PHP4 don't seem to be immediately available.
 Does anyone have suggestions on how to learn to use the new XML
functionality?
 The source code?

 Greg Steffenson


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP5 XML functions

2003-12-30 Thread Ray Hunter
Make sure that in your php.ini file that you have uncommented that the
php_dom extensions and any other extensions that you want to use.

Also make sure that php and your web server have access to the
extensions.

I usually place my extensions in the system path where they can be
accessed.

Also, I am not sure if the php installer contains all the extensions.  I
usually download the zip file and it contains all the extensions.


--
Ray

On Tue, 2003-12-30 at 21:38, Aidan Lister wrote:
 I wish, I'm interested as well :/
 
 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
  I've just gotten PHP5 B3 working using the precompiled binaries under Win
 XP,
  but the dom xml functions of PHP4 don't seem to be immediately available.
  Does anyone have suggestions on how to learn to use the new XML
 functionality?
  The source code?
 
  Greg Steffenson
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: the xml functions [worth a read]

2002-10-25 Thread Robert Samuel White
Thank you for your response.  First of all, I'm not sure if you are
familiar, but I am working on a project called eNetwizard Content
Management Server.  More is available here:
http://www.sourceforge.net/projects/enetwizard/
 
Content is stored as XML, but not in the usual manner.  eNetwizard is
able to manage an unlimited number of domains and websites from a
central web environment.  It does this because it acts as a web server
and determines what content to deliver based on the URL string.  Content
is stored in a matrix folder like this:
 
/matrix
/matrix/net
/matrix/net/enetwizard
/matrix/net/enetwizard/www
 
In this manner, all content for www.enetwizard.net
http://www.enetwizard.net/  is stored in the
/matrix/net/enetwizard/www folder.  However, it is even more complicated
than that.  Content is compiled by scope.  /matrix is considered the
global scope.  /matrix/net/enetwizard is in the domain scope.
/matrix/net/enetwizard/www is in the website scope.  And the files in
that directory are in the page scope.  Each of these directories can
have a file (_.rsw) which is a part of the eNetwizard XML that is
compiled.  It must be fully-conformant XML and this is determined by the
class I wrote to validate it.  My understanding is that PHP does not
have the ability to use DTD's - am I wrong about this?





Anyway, the reason for the scope is to build complex templates and
pages.  For example, maybe you want a copyright at the bottom of every
page that is on the enetwizard.net domain - you simply put it in the
TAIL section of the domain scope .RSW file.  When eNetwizard is
called, it compiles it all, validates it, and then converts it to HTML
(or anything else you want it to really).
 
Here's an example:
 
www.natural-law.net/default.exml  (this file is the result of compiling
and validating the .RSW files)
 
www.natural-law.net/default.ehtml  (this file is the result of
converting it)
 
Now, to get to what I'm trying to get at:  I understand that XML used
the ampersands as reserved words.  This is a good thing in most
instances, because it will be nice to define these entities, but how do
I do that with the limitations of the PHP parser functions?  And what is
the way around this?  I believe that the way I have things set up now, I
would like it to simply treat them as CDATA, because these can be dealt
with in the $Server class later on (when doing the conversions to HTML,
etc.)
 
Also, in order to validate the DTD (that I could make if PHP can work
with it) - it would have to wait till after the compilation of the .RSW
files - the .RSW files are also parsed as XML and first put into an
associative array - it organizes them by their main grouping and scope
-- STYLE, META, HEAD, BODY, and TAIL -- it works really
nicely, as those two links will show...
 
If you'd like to see the code for these two classes, let me know, and
I'll send them to you, and you can see how I have this set up.  It may
help to have a more interactive tour of how all of this works, but I
haven't gotten that far in the project yet.  I just finished the last of
the core (this XML stuff) and am about to start creating the wizards
(management panels) for the project, then the documentation, then the
release...
 
Thanks very much if you can give me an idea on how to tackle this unique
issue.
 
-Samuel
 
 
Robert Samuel White wrote:
 I am having a hard time understanding one of the features of the xml
 parser functions.
  
 If the string I am parsing includes nbsp; or something similar, it
 encounters an error.  I've read the docs and I don't understand how to
 have the parser process these.  Any advice would be great.
 
 
Basically, unless you've coded something to deal with them ampersands 
are the ultimate reserved word in XML. The easiest way to deal with them

is to scrub them to amp;nbsp; before they go through the XML parser.
 
The right way to deal with them is to define nbsp; as a valid entity 
in your DTD and make sure that all XML strings have a DTD when they are 
fed through the parser.
 
J Wynia
phpgeek.com
 



[PHP] Re: the xml functions

2002-10-24 Thread J Wynia
Robert Samuel White wrote:

I am having a hard time understanding one of the features of the xml
parser functions.
 
If the string I am parsing includes nbsp; or something similar, it
encounters an error.  I've read the docs and I don't understand how to
have the parser process these.  Any advice would be great.


Basically, unless you've coded something to deal with them ampersands 
are the ultimate reserved word in XML. The easiest way to deal with them 
is to scrub them to amp;nbsp; before they go through the XML parser.

The right way to deal with them is to define nbsp; as a valid entity 
in your DTD and make sure that all XML strings have a DTD when they are 
fed through the parser.

J Wynia
phpgeek.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php