Re: [PHP] php and XML BibTeX

2010-01-13 Thread Paul M Foster
On Wed, Jan 13, 2010 at 12:45:53PM -0800, Michael A. Peters wrote:

> Hi -
>
> Currently on my web site, book and article references are just stored in
> the database. While it works, I actually would like to move that out of
> the database and to an XML file, the reason being is that if/when I need
> to add fields etc. to the referenced sources, it's a lot easier to just
> edit a text file than modify database and recode my form interface for
> modifying the database. Also, there's an existing XML format for bibTeX
> and there already are tools to go from that to "real" bibTex, which I
> may need to do at some point.
>
> What I'm hoping is that already exists some php classes / functions for
> dealing with the XML bibTeX but I haven't found them. Anyone know of any?

I don't know, but the first place I look for things like that is
phpclasses.org.

Paul

-- 
Paul M. Foster

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



Re: [PHP] PHP and XML

2009-11-22 Thread Sudheer Satyanarayana


What do you recommend me to produce XML from those news of the SQL 
database?. What do you suggest to output XML from the existing content 
to then put those XML files into Flash.


The posted news are saved in a MySQL database. I don't know if do I 
need to output from PHP then parse the output and convert it to XML, 
or if Do I need to get the array from the MySQL and directly output 
this to an XML file to then get from this file from Flash.
From your PHP script, query the database, obtain the results in an 
array or object. Using the result variable build the XML file.



--

With warm regards,
Sudheer. S
Tech stuff: http://techchorus.net - Pro PHP XML - Book Review
Business: http://binaryvibes.co.in


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



Re: [PHP] PHP and XML

2009-11-22 Thread Phpster
I would just use concatenations and strings to build the XML. It's not  
gonna matter to the flash swf when it gets the string as it will  
attempt the data as XML.

Bastien

Sent from my iPod

On Nov 22, 2009, at 2:27 PM, Juan Marcelo Rodríguez Monti r> wrote:



Hi people,
I have some doubts about this topic that I'm gonna explain.

I have a few sites in flash, and I was requested to write a PHP  
frontend to send news. I have this already done and it works  
perfect. It's a LAMP App to send and edit news, post video, images  
and so on.


Then, I need to put all this news into the Flash site. So, I need to  
use XML. I'm not gonna discuss about Flash, because this is a PHP  
List, however I would like to talk about PHP and XML.


What do you recommend me to produce XML from those news of the SQL  
database?. What do you suggest to output XML from the existing  
content to then put those XML files into Flash.


The posted news are saved in a MySQL database. I don't know if do I  
need to output from PHP then parse the output and convert it to XML,  
or if Do I need to get the array from the MySQL and directly output  
this to an XML file to then get from this file from Flash.


Thanks,
Juan.


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



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



Re: [PHP] PHP and XML

2006-11-24 Thread Richard Lynch
On Thu, November 23, 2006 6:57 am, onewaylife wrote:
> I am novice in PHP & XML, while trying I am creating a small
> application
> i.e. Address Book.
> In this I am using Apache2, PHP5 and XML no database is used. I have
> FC5
> machines. but I am unable to store the files in XML. If any one share
> their
> experience in this by providing Examples or tutorials etc...
> So far I have found tutorial related to porting the information of
> data from
> MySQL to XML and then php with help of DOM.

You could just slap the whole address book into a single file with:
http://php.net/file_put_contents
http://php.net/file_get_contents

This, however, will get unwieldy for more than a few hundred addresses...

To "fix" that, you're going to have to basically re-implement a bunch
of functionality that is pretty much the nuts and bolts of a database,
so I'd suggest that maybe your inexperience is causing you to make a
Bad Choice for how to go about making an address book in the first
place. :-)

Note that you could also store it all in a database, and then provide
an XML output for, say, RSS or other portable reasons. And while it's
"more" work, the extra effort of the DB will actually be LESS work
than Doing It Right with just the raw file system access you propose.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] PHP and XML

2006-11-23 Thread Vincent DUPONT

Hi,

what do you plan to do with XML? Store your adresses, etc?

Then you can create an XML object with simpleXML (see 
http://be2.php.net/simplexml/)
This will help you in adding nodes and attributes.
Afterward, you can generate a output with $xml->asXML() and store this into a 
file  with file_put_content($xml->asXML());


If you edit a xml file in a text editor, you will see it is rather simple
study the simpleXML methods and you are ready !

best whishes !
vincent



-Original Message-
From: onewaylife [mailto:[EMAIL PROTECTED]
Sent: Thu 23/11/2006 13:57
To: php-general@lists.php.net
Subject: [PHP] PHP and XML
 

Dear All

I am novice in PHP & XML, while trying I am creating a small application
i.e. Address Book. 
In this I am using Apache2, PHP5 and XML no database is used. I have FC5
machines. but I am unable to store the files in XML. If any one share their
experience in this by providing Examples or tutorials etc... 
So far I have found tutorial related to porting the information of data from
MySQL to XML and then php with help of DOM. 

Thanks 
onewaylife
-- 
View this message in context: 
http://www.nabble.com/PHP-and-XML-tf2692397.html#a7507917
Sent from the PHP - General mailing list archive at Nabble.com.

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

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



RE: [PHP] PHP and XML

2006-11-23 Thread Edward Kay
Hello,

You say that you are "unable to store the files in XML". Why is this? Are
you getting an error message or do you just not know where to start?

Edward

> Dear All
>
> I am novice in PHP & XML, while trying I am creating a small application
> i.e. Address Book.
> In this I am using Apache2, PHP5 and XML no database is used. I have FC5
> machines. but I am unable to store the files in XML. If any one
> share their
> experience in this by providing Examples or tutorials etc...
> So far I have found tutorial related to porting the information
> of data from
> MySQL to XML and then php with help of DOM.
>
> Thanks
> onewaylife
> --
> View this message in context:
> http://www.nabble.com/PHP-and-XML-tf2692397.html#a7507917
> Sent from the PHP - General mailing list archive at Nabble.com.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

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



RE: [PHP] PHP and XML

2005-10-06 Thread Robbert van Andel
Yes, I resolved the problem today by installing this RPM via yum.  I had
assumed it was already installed because I was able to do some XML parsing
without it.  

I was able to get the XML transformed and it looks good, if I do say so
myself :)

Robbert

-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 06, 2005 8:05 AM
To: php-general@lists.php.net
Subject: RE: [PHP] PHP and XML

Quoting Robbert van Andel <[EMAIL PROTECTED]>:

> Thanks, I'm investigating XSL and it looks pretty good.  We use an RPM
based
> installation of PHP version 5.0.4.  I see on PHP.net's website that XSL
> comes standard with PHP 5 and you need to enable it by adding the argument
> --with-xsl to the configure line.  How do I do this when we did not build
> PHP from source?  Is there another way to get XSL activated?
>
> Thanks for your help
> Robbert

You don't mention which distro you're using, but Fedora Core 4 has a 
php-xml rpm to "...add support to PHP for manipulating XML documents 
using the DOM tree, and performing XSL transformations on XML 
documents."

Hope this helps,
Rick
-- 
Rick Emery

"When once you have tasted flight, you will forever walk the Earth
with your eyes turned skyward, for there you have been, and there
you will always long to return"
  -- Leonardo Da Vinci

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

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



RE: [PHP] PHP and XML

2005-10-06 Thread Rick Emery

Quoting Robbert van Andel <[EMAIL PROTECTED]>:


Thanks, I'm investigating XSL and it looks pretty good.  We use an RPM based
installation of PHP version 5.0.4.  I see on PHP.net's website that XSL
comes standard with PHP 5 and you need to enable it by adding the argument
--with-xsl to the configure line.  How do I do this when we did not build
PHP from source?  Is there another way to get XSL activated?

Thanks for your help
Robbert


You don't mention which distro you're using, but Fedora Core 4 has a 
php-xml rpm to "...add support to PHP for manipulating XML documents 
using the DOM tree, and performing XSL transformations on XML 
documents."


Hope this helps,
Rick
--
Rick Emery

"When once you have tasted flight, you will forever walk the Earth
with your eyes turned skyward, for there you have been, and there
you will always long to return"
 -- Leonardo Da Vinci

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



Re: [PHP] PHP and XML

2005-10-05 Thread Stephen Leaf
On Wednesday 05 October 2005 09:46 pm, Robbert van Andel wrote:
> Thanks, I'm investigating XSL and it looks pretty good.  We use an RPM
> based installation of PHP version 5.0.4.  I see on PHP.net's website that
> XSL comes standard with PHP 5 and you need to enable it by adding the
> argument --with-xsl to the configure line.  How do I do this when we did
> not build PHP from source?  Is there another way to get XSL activated?

Compiling it from source will be your best choice.
If you have a test server compile it there and create the rpm. then install on 
the production server.

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



RE: [PHP] PHP and XML

2005-10-05 Thread Robbert van Andel
Thanks, I'm investigating XSL and it looks pretty good.  We use an RPM based
installation of PHP version 5.0.4.  I see on PHP.net's website that XSL
comes standard with PHP 5 and you need to enable it by adding the argument
--with-xsl to the configure line.  How do I do this when we did not build
PHP from source?  Is there another way to get XSL activated?

Thanks for your help
Robbert 

-Original Message-
From: Stephen Leaf [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 05, 2005 7:39 PM
To: php-general@lists.php.net
Subject: Re: [PHP] PHP and XML

On Wednesday 05 October 2005 06:20 pm, [EMAIL PROTECTED] wrote:
> My company recently installed google's search appliance and I am working
> on some scripts to display the search results on our various websites.
> The problem I'm having is using the XML parsing functions I've used on
> other pages is not working because the returned XML has invalid xml
> characters in it.  For example, the data between the xml tags include
> html tags that are supposed to be displayed.  But when I parse the xml,
> the parse sees these tags as new start tags.  Is there a way to work
> around this or a different way to parse this document?  I've heard a
> little about XSLT really don't know anything about it and am wondering
> if that is the way to deal with it?
XSL can display the contents using a 

bear in mind tho that it also copies the node name.
example:
copied stuff

copying only the inner content can be achieved by doing a select="." however

you'll need to have the current node be the one that you want copied.
this can be done by using a




If anyone else knows of a better way _please_ let me know :)

When working with XML and going to HTML .. IMO XSL is the best way to 
accomplish it.

>
> Here is a part of the XML returned by the google appliance:
> 
> 0.008398
> information services
>  original_value="information+services"/>
> 
> 
> 
>  original_value="Google+Search"/>
> 
> 
> -
>   
> 86
> 
> -
>   
> -
>   
>
/search?q=information+services&site=shpolicy&hl=en&output=xml_no_dtd&client
>=shpolicy&access=p&sort=date:D:L:d1&start=10&sa=N 
> 
> -
>   
> -
>   
>
http://shpolicy.shservices.org/administrative/InformationServices/housewide
>applicable/Information%20Services%20Software%20Purchasing%20Policy.pdf 
> -
>   
>
http://shpolicy.shservices.org/administrative/InformationServices/housewide
>applicable/Information%2520Services%2520Software%2520Purchasing%2520Policy.
p
>df 
> -
>   
> Information Services Software Purchasing
> 
> 5
> 
> -
>   
>  ... Administrative Housewide Policy Information
> Services Software Purchasing Applicable Campus: Salem and
> West Valley Hospitals Department Name: Information ...
> 
> -
>   
> 
> 
> 
> 
>
> I can send the parsing code but it's fairly straight forward and I
> didn't want to needlessly fill up the email.
>
> Any suggestions?
>
> Thanks,
> Robbert van Andel

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

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



Re: [PHP] PHP and XML

2005-10-05 Thread Stephen Leaf
On Wednesday 05 October 2005 06:20 pm, [EMAIL PROTECTED] wrote:
> My company recently installed google's search appliance and I am working
> on some scripts to display the search results on our various websites.
> The problem I'm having is using the XML parsing functions I've used on
> other pages is not working because the returned XML has invalid xml
> characters in it.  For example, the data between the xml tags include
> html tags that are supposed to be displayed.  But when I parse the xml,
> the parse sees these tags as new start tags.  Is there a way to work
> around this or a different way to parse this document?  I've heard a
> little about XSLT really don't know anything about it and am wondering
> if that is the way to deal with it?
XSL can display the contents using a 

bear in mind tho that it also copies the node name.
example:
copied stuff

copying only the inner content can be achieved by doing a select="." however 
you'll need to have the current node be the one that you want copied.
this can be done by using a




If anyone else knows of a better way _please_ let me know :)

When working with XML and going to HTML .. IMO XSL is the best way to 
accomplish it.

>
> Here is a part of the XML returned by the google appliance:
> 
> 0.008398
> information services
>  original_value="information+services"/>
> 
> 
> 
>  original_value="Google+Search"/>
> 
> 
> -
>   
> 86
> 
> -
>   
> -
>   
> /search?q=information+services&site=shpolicy&hl=en&output=xml_no_dtd&client
>=shpolicy&access=p&sort=date:D:L:d1&start=10&sa=N 
> 
> -
>   
> -
>   
> http://shpolicy.shservices.org/administrative/InformationServices/housewide
>applicable/Information%20Services%20Software%20Purchasing%20Policy.pdf 
> -
>   
> http://shpolicy.shservices.org/administrative/InformationServices/housewide
>applicable/Information%2520Services%2520Software%2520Purchasing%2520Policy.p
>df 
> -
>   
> Information Services Software Purchasing
> 
> 5
> 
> -
>   
>  ... Administrative Housewide Policy Information
> Services Software Purchasing Applicable Campus: Salem and
> West Valley Hospitals Department Name: Information ...
> 
> -
>   
> 
> 
> 
> 
>
> I can send the parsing code but it's fairly straight forward and I
> didn't want to needlessly fill up the email.
>
> Any suggestions?
>
> Thanks,
> Robbert van Andel

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



Re: [PHP] PHP and XML.

2004-02-02 Thread Mark Ackroyd


Rolf Brusletto wrote:

The only thing I can think of is apache/you_webserver_here is limiting 
the amount of memory.. still an odd problem though, depending on the 
size of the xml..
The XML is tiny, 12 lines.  I got round the problem by chopping up 
someone elses PHP XML parser script, so that it wasn`t using expat.

Wich I had time to look into all of these little things :-)

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


Re: [PHP] PHP and XML.

2004-01-30 Thread Raditha Dissanayake
I agree with Rolf, What's really suprising though is that SAX parsers 
use very little memory in the first place.

Rolf Brusletto wrote:

Mark Ackroyd wrote:

Odd problem.

I have written a small script that processes some XML, it runs on a 
few FreeBSD boxes I admin over. On one of the boxes (the only one) .. 
if I run this script through apache, The xml_set_element_handler and 
xml_set_character_data_handler functions return a 1 error (out of 
memory)

If I run the scripts from the Command lime they work fine !

anyone got any ideas?

Mark


**always be careful when using the command lime :D

j/k

The only thing I can think of is apache/you_webserver_here is limiting 
the amount of memory.. still an odd problem though, depending on the 
size of the xml..





--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP and XML.

2004-01-30 Thread Rolf Brusletto
Mark Ackroyd wrote:

Odd problem.

I have written a small script that processes some XML, it runs on a 
few FreeBSD boxes I admin over. On one of the boxes (the only one) .. 
if I run this script through apache, The xml_set_element_handler and 
xml_set_character_data_handler functions return a 1 error (out of memory)

If I run the scripts from the Command lime they work fine !

anyone got any ideas?

Mark


**always be careful when using the command lime :D

j/k

The only thing I can think of is apache/you_webserver_here is limiting 
the amount of memory.. still an odd problem though, depending on the 
size of the xml..



--
Rolf Brusletto
rolf[at]emailfeeds[dot]com
http://www.emailfeeds.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP and XML help needed

2003-09-11 Thread Raditha Dissanayake
Hi Mr Bogomil,

IMHO you should try to do this with  most things that look like 
it should be delegated to php can in fact be done easily with
 or 

best regards
raditha


Mr. Bogomil Shopov wrote:

Hi folks
How I can put some php code in a XSL template.
I have a function that returns a value and I want this value to be entered
in a   tag in XSL template?
Thanks
Bogomil
 



--
http://www.radinks.com/upload
Drag and Drop File Uploader.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP and XML Resources

2002-07-05 Thread Analysis & Solutions

Hola:

On Thu, Jul 04, 2002 at 01:12:26PM -0600, CM wrote:
>
> Can anyone recommend a good book or web page on php and xml?
> The "Professional PHP4 XML" book by wrox looks good but I haven't read any
> reviews on it.

I have a demonstration page at
http://www.analysisandsolutions.com/code/phpxml.htm

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] Php and XML

2002-04-29 Thread Richard Emery

It's already been done many times.

Go to Google and search for it.  Also, try sourceforge and hotscripts

save yourself the aggravation...

- Original Message -
From: Philip Yeo <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 29, 2002 7:14 AM
Subject: [PHP] Php and XML


Hi there,

I would like to create an XML parser using Php. Any good references for
doing this??

Philip



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




Re: [PHP] PHP and XML/XLST/WDDX etc

2002-03-29 Thread Rich Buggy

> I am in a dilemma right now between "If it ain't broke, don't fix it" and
"Looking
> over my shoulder".  I am trying to determine whether it makes more sense
to use
> ML for maintaining configuration files.

  Compiled program ==> ML configuration file
  Interpreted program (i.e PHP) ==> included configuration file with
variables set

  For most interpreted programs I can't see any advantage in adding extra
code and processing time just to store the config file in a ML.

> As far as content management, we use static include files or MySQL
databases to
> store site content.   I am not sure where the advantage of using XML/XLST
for this
> functionality.

  I'm currently working on a class library/application framework for PHP
(similar to Delphi's VCL) in which I'm using XML/XSLT for the templates.
It's working great with development not taking very long at all. The two
main advantages of using XML/XSLT for content management that I can see are:
1. It's easier to enforce a common look and feel on a site.
2. It's easier to re-target content (different transformations for
different browsers).
.

  Rich



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




RE: [PHP] PHP and XML/XLST/WDDX etc

2002-03-29 Thread J. Scott Johnson

Just to follow up on some of these thoughts.

XML is definitely complicated to move into.  Its unclear if you aren't
involved in data interchange, if the benefits are really there.  If you are
just developing in your own way, you may not need it.  OTOH, its new, sexy
and may "sell better" to your customers (if you have such).  Bear in mind
that if you are db backed, you still need to flatten to store in a DB.
There aren't many XML stores, most aren't that good, and they aren't that
fast.  With that said, I am doing XML now but its for data interchange, not
anything else.

NOTE -- I was doing SGML in 89 and XML ain't all that different.

Scott

* * * * * * * * * * * * * * * * * * * * * * * * * *
J. Scott Johnson
PHP Consulting and Design Work
* * * * * * * * * * * * * * * * * * * * * * * * * *
Virtual:
* * * * * * * * * * * * * * * * * * * * * * * * * *
[EMAIL PROTECTED]
http://www.fuzzygroup.com/
Yahoo IM: fuzzygroup


-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 29, 2002 12:54 PM
To: Dennis Moore
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP and XML/XLST/WDDX etc



On Friday, March 29, 2002, at 12:52  PM, Dennis Moore wrote:

> I am in the process of updating many of my applications to include
> XML/XLST/ and/or WDDX technologies.   Many of my applications read a
> static configuration file which assigns values to variables and arrays.
> If we need to change something we manually edit the configuration files.
> In some instances, we have written web interfaces to manage these
> configuration files.
>
> I am in a dilemma right now between "If it ain't broke, don't fix it"
> and "Looking over my shoulder".  I am trying to determine whether it
> makes more sense to use XML for maintaining configuration files.
>
> As far as content management, we use static include files or MySQL
> databases to store site content.   I am not sure where the advantage of
> using XML/XLST for this functionality.

In my experience, you're going to get a lot of anti-XML responses about
this.  My limited experience of dealing with XML is that it is very
complicated and difficult to actually do, regardless of the promises of
simplicity that are usually made when discussing XML.  HOWEVER -- once
your application is all set up, I imagine that it will actually be
somewhat easier to maintain.  It's learning how to do all of this, plus
the fact that the XML tech is so young right now.  For instance, check
out the man page on xslt_set_sax_handler() or xslt_set_sax_handlers() --
not very informative.  And while xslt_process() has a man page that
actually explains how to use it, it really helps to have a more
fundamental understanding of XSLT, since it is not explained in the man
page why you use the argument syntax that is used.

I just discovered this last one last night... so you might have seen the
thread.  I think it's interesting, and I'm trying to incorporate it into
my app even though it DEFINITELY doesn't need this kind of
functionality, because I want to learn more about it.  In fact, if
performance or high volume are issues to you, then you should probably
hold off for now, as most of these functions require quite a bit of
processing -- XML was never intended to be lean or mean.

Probably the hardest thing is finding resources on this -- there are
quite a few tutorials on DevShed or SitePoint or PHPBuilder that do a
good job of introducing a topic, and there are some books on XML itself,
and its related technologies, but I haven't found much that goes
in-depth into using PHP with XML.  There is far more about Java and XML
than PHP.  I finally found a mailing list devoted to PHP/XML issues, but
it's on Yahoo! Groups and I'm having a bitch of a time getting
subscribed (who ever thought that a web-based interface for mailing list
management was a good idea?)

Anyway, best of luck to you -- let me know if you find a community
dedicated to this very topic, since I'd like to focus on it a bit more.


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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



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




Re: [PHP] PHP and XML/XLST/WDDX etc

2002-03-29 Thread Erik Price


On Friday, March 29, 2002, at 12:52  PM, Dennis Moore wrote:

> I am in the process of updating many of my applications to include
> XML/XLST/ and/or WDDX technologies.   Many of my applications read a
> static configuration file which assigns values to variables and arrays.
> If we need to change something we manually edit the configuration files.
> In some instances, we have written web interfaces to manage these
> configuration files.
>
> I am in a dilemma right now between "If it ain't broke, don't fix it"
> and "Looking over my shoulder".  I am trying to determine whether it
> makes more sense to use XML for maintaining configuration files.
>
> As far as content management, we use static include files or MySQL
> databases to store site content.   I am not sure where the advantage of
> using XML/XLST for this functionality.

In my experience, you're going to get a lot of anti-XML responses about 
this.  My limited experience of dealing with XML is that it is very 
complicated and difficult to actually do, regardless of the promises of 
simplicity that are usually made when discussing XML.  HOWEVER -- once 
your application is all set up, I imagine that it will actually be 
somewhat easier to maintain.  It's learning how to do all of this, plus 
the fact that the XML tech is so young right now.  For instance, check 
out the man page on xslt_set_sax_handler() or xslt_set_sax_handlers() -- 
not very informative.  And while xslt_process() has a man page that 
actually explains how to use it, it really helps to have a more 
fundamental understanding of XSLT, since it is not explained in the man 
page why you use the argument syntax that is used.

I just discovered this last one last night... so you might have seen the 
thread.  I think it's interesting, and I'm trying to incorporate it into 
my app even though it DEFINITELY doesn't need this kind of 
functionality, because I want to learn more about it.  In fact, if 
performance or high volume are issues to you, then you should probably 
hold off for now, as most of these functions require quite a bit of 
processing -- XML was never intended to be lean or mean.

Probably the hardest thing is finding resources on this -- there are 
quite a few tutorials on DevShed or SitePoint or PHPBuilder that do a 
good job of introducing a topic, and there are some books on XML itself, 
and its related technologies, but I haven't found much that goes 
in-depth into using PHP with XML.  There is far more about Java and XML 
than PHP.  I finally found a mailing list devoted to PHP/XML issues, but 
it's on Yahoo! Groups and I'm having a bitch of a time getting 
subscribed (who ever thought that a web-based interface for mailing list 
management was a good idea?)

Anyway, best of luck to you -- let me know if you find a community 
dedicated to this very topic, since I'd like to focus on it a bit more.


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




RE: [PHP] PHP and XML

2002-02-04 Thread Sandeep Murphy

If its parsing xml using PHP is what u r looking for, chk out:

http://www.phpbuilder.com/columns/joe2907.php3

http://www.zend.com/zend/art/parsing.php

http://www.melonfire.com/community/columns/trog/archives.php



-Original Message-
From: Peter J. Schoenster [mailto:[EMAIL PROTECTED]]
Sent: segunda-feira, 4 de Fevereiro de 2002 3:24
To: [EMAIL PROTECTED]
Subject: [PHP] PHP and XML


Hi,

I'd appreciate any pointers you recommend to good sources of 
information on how to use PHP and XML. 

Thanks,

Peter

---
"Reality is that which, when you stop believing in it, doesn't go
away".
-- Philip K. Dick

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

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




RE: [PHP] PHP and XML

2001-11-29 Thread Robert Samuel White

"XML By Example" Second Edition, published by Que, written by Benoit
Marchal, is the best resource out there in my opinion.  This book was
used in one of my college courses.

-Original Message-
From: Tom Malone [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, November 29, 2001 7:13 PM
To: PHP List
Subject: [PHP] PHP and XML


Can anyone recommend a good book on XML, maybe from a PHP perspective?

Tom Malone



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP and XML

2001-11-29 Thread Brian White

You could try "XML for Dummies" as a starting point - I have it on my desk
and I have yet to read it in depth but it looks like it explains most 
things OK,
and it has the advantage for PHP folk that it is aimed at people who already
know alot about how HTML works.


At 19:13 29/11/2001 -0500, Tom Malone wrote:
>Can anyone recommend a good book on XML, maybe from a PHP perspective?
>
>Tom Malone
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

-
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
Phone: +612-93197901
Web:   http://www.steptwo.com.au/
Email: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php and xml

2001-02-13 Thread Chris Lee

testing
testing");
?>

works for me on my linux box. have you checked your permisions ?


--


Chris Lee
Mediawaveonline.com

em. [EMAIL PROTECTED]

ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120



""Jan Grafström"" <[EMAIL PROTECTED]> wrote in message
96c6t7$52l$[EMAIL PROTECTED]">news:96c6t7$52l$[EMAIL PROTECTED]...
> Hi!
> I have this php:
> $message = ereg_replace("\r","", $message);
> $message =
> "$message$name$adress$tele";
> $fp = fopen (basename($PHP_SELF) . ".comment", "a");
> fwrite ($fp, $message);
> fclose ($fp);
> There must be something wrong in first line beacause the value of message
is
> not writed.
> I also want the output to contain a in beginning.
>
> Thanks for any help
> Jan Grafstrom
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php and xml

2001-02-13 Thread Nathan Cassano

Steve,
Did you take a look at the raw data returned by the fsockopen file pointer.
There may be some http headers that are tripping up the xml parser.

-Original Message-
From: Steve Haemelinck [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 12:07 PM
To: PHP Mailing Listl (E-mail)
Subject: [PHP] XML Parsing through Proxy


Hi Anybody got an idea?

I am sitting behind a proxy and I want to able to parse an XML.
So I have to use fsockopen() to get through my firewall and get the page.
So far, everything goes wel, but I am not able to parse the file, because I
think it is not in XML format if I use "GET http:// "
Does anyone has an idea how I can solve this?

My code so far (bits and pieces of anywhere :) )


Steve


 "HEADER_TAG",
"ISSUE-NAME" => "STOCK_NAME",
"LAST-SALE-PRICE" => "LAST_SALE",
"PREVIOUS-CLOSE-PRICE" => "PREVIOUS_SALE",
"NET-CHANGE-PRICE" => "CHANGE",
"NET-CHANGE-PCT" => "CHANGE_PCT",
"TODAYS-HIGH-PRICE" => "TODAYS_HIGH",
"TODAYS-LOW-PRICE" => "TODAYS_LOW",
);

# XML File to Parse
$xmlFile_Location="http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&sy
mbol=NETA";


// Functions

# StartElement Of Parser
function startElement($parser, $name, $attrs=''){
global $map_array, $temp, $current_tag;

$current_tag = $name;
if ($format = $map_array[$name]){
switch($name){
case 'NASDAQAMEX-DOT-COM':
//echo $HTTP_GET_VARS['ticker'];
break;
default:
break;
}
}
}

# EndElement Of Parser
function endElement($parser, $name, $attrs=''){
global $map_array, $temp, $current_tag;

if ($format = $map_array[$name]){
switch($name){
case 'NASDAQAMEX-DOT-COM':
return_page($temp);
$temp = '';
break;
default:
break;
}
}
}

# Process the Data between XML-Tags
function characterData($parser, $data){
global $current_tag, $temp, $catID;

switch($current_tag){
case 'ISSUE-NAME':
$temp['STOCK_NAME'] = $data;
$current_tag = '';
break;
case 'LAST-SALE-PRICE':
$temp['LAST_SALE'] = $data;
$current_tag = '';
break;
default:
break;
}
}

# Create the XML Parser and set options
$type="UTF-8";
$xml_parser = xml_parser_create($type);
xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true);
xml_set_element_handler($xml_parser, 'startElement','endElement');
xml_set_character_data_handler($xml_parser, 'characterData');

/* Open a connection through Proxy with Nasdaq and start parsing */
$sockPointer = fsockopen($proxy_ip,$proxy_port, $errNo, $errStr,30);
//Connect to Proxy

if( !$sockPointer ){
echo "$errStr Proxy not Available \n\n";
exit();
}
else{
fputs($sockPointer,"GET $xmlFile_Location/ \n\n");
while (!feof($sockPointer)){
$Data = fgets($sockPointer, 10);
$tag= "\n\n";
if( eregi("xml version",$Data) ){
$Parse=1;
}
if($Parse==1){
if (!($Data = utf8_encode($Data))){
echo 'ERROR'."\n";
}
if (!xml_parse($xml_parser, $Data, feof($sockPointer))){
die(sprintf( "XML error: %s at line %d\n\n",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
}
}
}
fclose($sockPointer);
}

xml_parser_free($xml_parser);

?>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]