mona Posted April 4, 2006 Share Posted April 4, 2006 I'm trying to save some data in xml files and other data in database(mysql).I'm using php to manipulate my data that are saved in database. I need to know which is the best way to use in my case to manipulate the data in xml files ( extract them by elements and attributes, edit them ,traversinng nodes and searching for a certain node contents inside them..etc)Is it easy to use xslt for these purposes?knowing that some data will be extracted from xml files and saved to the database. Link to comment Share on other sites More sharing options...
Little Goat Posted April 4, 2006 Share Posted April 4, 2006 I don't think xslt can save to databases.I might be wrong though. LG Link to comment Share on other sites More sharing options...
mona Posted April 4, 2006 Author Share Posted April 4, 2006 I don't need to save in database using xslt, I can use php but my question is how to manipulate xml files by adding to them and searching inside them using xslt Link to comment Share on other sites More sharing options...
Little Goat Posted April 5, 2006 Share Posted April 5, 2006 yes there are functions that can do that, I don't know if I'd say easy, you have to learn XSL. Try the tutorials(I'm starting to sound like a mod )LG Link to comment Share on other sites More sharing options...
mona Posted April 5, 2006 Author Share Posted April 5, 2006 thank u I'm already learning xsl Link to comment Share on other sites More sharing options...
dooberry Posted April 5, 2006 Share Posted April 5, 2006 Actually it is possible to (ab)use xslt to write to a database.XSL allows you to write script (java or vb) within the stylesheet and you can (ab)use this to put ADO to work on the data.You could execute the ado transactions using XMLDOM to read the xml file you create.You guys probably aren't stuck with notepad like I am though so have fun using all your fancy IDE!!! :)Dooberry. Link to comment Share on other sites More sharing options...
boen_robot Posted April 5, 2006 Share Posted April 5, 2006 I knew XSLT could write JavaScript and VBScript, but ADO? Really?!?! Isn't ADO part of ASP which is a server side scripting language?Khm... anyway, we have our last problem here. As far as I understood, mona works with PHP. This would complicate the things a bit, scince unlike ASP, PHP doesn't have an XSLT processor . Link to comment Share on other sites More sharing options...
Little Goat Posted April 5, 2006 Share Posted April 5, 2006 no, I saw somewhere the functions for xslt in php once, I just don't remember them.LG Link to comment Share on other sites More sharing options...
boen_robot Posted April 5, 2006 Share Posted April 5, 2006 What I meant to say is that PHP doesn't have built in XSLT processor. It is avaiable with an extension. See the XSL functions of PHP for details. If anyone knows how to install the extension, please, do tell. Link to comment Share on other sites More sharing options...
dooberry Posted April 6, 2006 Share Posted April 6, 2006 I think ADO is generally shown as a server side language, but when you look at it objectively (excuse the pun!! ) it's just a set of objects that can be manipulated to connect to and change a database. As long as you have the libraries, you can use ADO - it's just easier to manage with server side scripting because the libraries are on the server instead of having to be on each client.In my case I can use it because I know that all of the clients that will be using the system will have ADO installed, but this would not be the case for everyone.Dooberry. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now