Net123 Posted July 15, 2012 Share Posted July 15, 2012 is it was possible to read and write xml files like an text file or it needs other some special steps ??? Link to comment Share on other sites More sharing options...
boen_robot Posted July 15, 2012 Share Posted July 15, 2012 Yes. You can open them as text files, although it's a better idea to open them using DOM or SimpleXML instead. 1 Link to comment Share on other sites More sharing options...
Net123 Posted July 16, 2012 Author Share Posted July 16, 2012 How to write my text before the last line is there was any way for it in php ? Link to comment Share on other sites More sharing options...
birbal Posted July 16, 2012 Share Posted July 16, 2012 is it plain text file or XML ? Link to comment Share on other sites More sharing options...
Net123 Posted July 18, 2012 Author Share Posted July 18, 2012 its xml file and i wanna write my links and titles, for ajax search so i need like this i need it for the xml file containg like this<pages><link> dnknsk</link><name>kdjhnskn</name></pages> if i writed it will contain with extra <pages>................ Link to comment Share on other sites More sharing options...
birbal Posted July 18, 2012 Share Posted July 18, 2012 did you check the link of simplexml boen gave you? you need to call addchild() from the node you want to insert in. http://in3.php.net/manual/en/simplexml.examples-basic.php <=basic usagehttp://in3.php.net/manual/en/simplexmlelement.addchild.php <=addchild() 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