XML PHP
- Started
- Last post
- 10 Responses
- Epictive
I mostly work in flash so bare with me. I am fine with working with Flash and XML, but was recently asked to make a corresponding HTML site that runs off the same XML files as the flash site. Change one file, update two sites. I know nothing about XML parsing with PHP, but I assume that is the best way for me to do so.
For example, I have this simple XML file:
http://www.aaronclinger.com/file…Can anyone point me in the right direction to having PHP write out the above XML file, so the images title and links corresponds with the XML file? Or link me to a tutorial? I am assuming once I see how this is done, and I can figure out the rest. Thanks for your time.
- snarlen0
this sounds kind of similar to what estlin needed. If you want, I can email you the same file I sent him. It's really just a very simpl server side xml parser that stores the elements as variables, then you can do whatever you want with them.
- ldww0
i am going to have to start mess with hooking xml to php as well. i get emails that contain stuff like the below
i need to read it and set a value based on what key is pressed at what prompt
any idea where to even start? i have never used xml
- Epictive0
snarlen yeah if you could email me that be great,
anyother links or help?
- snarlen0
Yeah, I got a lot of help from this site: http://www.bayes.co.uk/xml/index…
and a lot help from the O'Reilly books 'programming php' and 'xml in a nutshell'
- Epictive0
XSL only works on IE 5+, which leaves out too many browsers for me. I guess I need to actually parse it to code and not use a style sheet. Thanks.
- snarlen0
you could also try to convince your hosting company to install a server side xslt program, then you'd be doing the transformations on the server and sending the client xhtml.
- Epictive0
Sorry, bump. Any help out there?
- JazX0
I could have sworn I saw something on this at http://www.hotscripts.com good luck, I love your other work man ;)
- Epictive0
Thanks a lot JazX for the link and complement. Much appreciated.
This:
http://hotscripts.com/XML/Tips_a…
should get me rolling.
- Schill0
Re: server-side parasing.. PHP can use the Sablotron and Expat libraries for XSLT.
http://www.zend.com/zend/art/par…
Not for the feint of heart, but handy if you can hack it.