[PHP] XML/MySQL

2003-10-26 Thread Ian Williams
Apologies to anyone also subscribed to php.xml.dev, who will have read this
earlier, but it doesn't seem as frequently read as this news group... so I
am reposting...


Hi
I want to write a function that will take any SQL query as a parameter, and
generate XML that represents the recordset.

e.g. "SELECT * FROM Customers"

returns:







There are two approaches I think. One is to use the XML DOM, the other is
simply to join lots of strings together. What is the best approach?

Thanks (and this is my first post to a newsgroup, and my first post to this
one, so excuse me if I've missed something vital!)

cheers
ian ;-)

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



[PHP] Re: XML/MySQL

2003-10-27 Thread Ian Williams
Thanks to everyone who has responded. I have a lot of useful suggestions,
and a warm feeling about this newsgroup ;-). I hope I can be of help to
everyone in the future.

cheers
ian

"Ian Williams" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Apologies to anyone also subscribed to php.xml.dev, who will have read
this
> earlier, but it doesn't seem as frequently read as this news group... so I
> am reposting...
>
>
> Hi
> I want to write a function that will take any SQL query as a parameter,
and
> generate XML that represents the recordset.
>
> e.g. "SELECT * FROM Customers"
>
> returns:
>
> 
> 
> 
> 
> 
>
> There are two approaches I think. One is to use the XML DOM, the other is
> simply to join lots of strings together. What is the best approach?
>
> Thanks (and this is my first post to a newsgroup, and my first post to
this
> one, so excuse me if I've missed something vital!)
>
> cheers
> ian ;-)

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



[PHP] Re: Parsing specific portions of XML files

2003-10-28 Thread Ian Williams
If it's anything like the Microsoft XML DOM object, you can use an XPath
query to select the portion of the XML file that you want.

"Ryan Thompson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I'm stumped. I think it's just the logic I can't figure out. I have a file
formatted for Docbook in XML. I'm trying to figure out a way to parse a
specifice portion of an itemizedlist.

It's for a change log. I want users to be able to view changes made to just
one version and possibly for all. I can't use multiple change logs cause it
the same file is used to make the text version that goes into the release
documentation.

Anyone got any ideas that can give me a push in the right direction.

--
Ryan Thompson
[EMAIL PROTECTED]
http://osgw.sourceforge.net
==
"A computer scientist is someone who fixes
 things that aren't broken" --Unknown

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



[PHP] XML DOM

2003-11-03 Thread Ian Williams
I have an XML document as a string $strXml, that looks a little like this:



1
Bob
Rover


2
Fred
Fido



What's the best way to grab a single value from this document? In the past
(in
VB), I have loaded the XML into a DOM Document, and used an XPath query to
select the data I want, and then bung the output into a string.

Any suggestions?

Thanks
Ian

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



[PHP] Fatal error: Call to undefined function: xpath_new_context()

2003-11-04 Thread Ian Williams
I am trying to do a little XPath, but I get this error:

Fatal error: Call to undefined function: xpath_new_context() in

Can someone please help me find my problem?

cheers
ian

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



[PHP] Job Vacancy

2003-11-06 Thread Ian Williams
Hi
my company (the one I work for I mean) are looking for a Junior Web
Developer.

They are based in Berkshire, and would ideally like someone with 1-2 years
experience.

Skills to include: a firm grasp of HTML and JavaScript, experience of
server-side scripting (any flavour, but ASP / PHP preferred). Nice to haves
include XML/XSL, MySQL or SQL Server, graphical skills etc...

Salary depending on experience - please state expectations.

Please drop me a line with your CV if interested - note - you must be living
in the area already, and willing to start ASAP. We cannot sponsor any
working visa's or the like.

Many thanks!

ian

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



[PHP] Testing for Well-Formed XML

2003-12-30 Thread Ian Williams
Hi
I'm trying to build a validator in PHP, to check that XML documents are
well-formed.
Does anyone have an algorithm for doing this?

KR
ian

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