Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 1 | ########## |
| 2 | XML Helper |
| 3 | ########## |
| 4 | |
| 5 | The XML Helper file contains functions that assist in working with XML |
| 6 | data. |
| 7 | |
| 8 | .. contents:: Page Contents |
| 9 | |
| 10 | Loading this Helper |
| 11 | =================== |
| 12 | |
| 13 | This helper is loaded using the following code |
| 14 | |
| 15 | :: |
| 16 | |
| 17 | $this->load->helper('xml'); |
| 18 | |
| 19 | The following functions are available: |
| 20 | |
| 21 | xml_convert() |
| 22 | ===================== |
| 23 | |
| 24 | Takes a string as input and converts the following reserved XML |
| 25 | characters to entities: |
| 26 | |
| 27 | - Ampersands: & |
| 28 | - Less then and greater than characters: < > |
| 29 | - Single and double quotes: ' " |
| 30 | - Dashes: - |
| 31 | |
| 32 | This function ignores ampersands if they are part of existing character |
| 33 | entities. Example |
| 34 | |
| 35 | :: |
| 36 | |
| 37 | $string = xml_convert($string); |
| 38 | |