i have website and the XML from another site gives booking info within the CDATA and i want to extract the content of this CDATA using PHP and also create a button so when this is clicked this CDAT content is retrieved. Please help
Jump to Post
Use SimpleXML: http://php.net/manual/en/book.simplexml.php
From that extension you can use simplexml_load_file() with LIBXML_NOCDATA, here's an example:
# XML file <?xml version='1.0' standalone='yes'?> <aaa> <bbb> <id>1</id> <title>title 1</title> <msg><![CDATA[hello world string]]></msg> </bbb> …
All 4 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.