Changeset 21 for trunk/include/functions_xml.inc.php
- Timestamp:
- Jul 1, 2003, 11:27:20 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_xml.inc.php
r13 r21 19 19 define( ATT_REG, '\w+' ); 20 20 define( VAL_REG, '[^"]*' ); 21 22 21 //------------------------------------------------------------------- functions 23 22 // getContent returns the content of a tag … … 33 32 $content = preg_replace( '/^<[^>]+>/', '', $element ); 34 33 // deleting end of the tag 35 $content = preg_replace( '/<\/ \w+>$/', '', $content );34 $content = preg_replace( '/<\/[^>]+>$/', '', $content ); 36 35 // replacing multiple instance of space character 37 36 $content = preg_replace( '/\s+/', ' ', $content ); … … 40 39 } 41 40 42 // The function get Attribute returns the value corresponding to the attribute43 // $attribute for the tag $element.41 // The function get Attribute returns the value corresponding to the 42 // attribute $attribute for the tag $element. 44 43 function getAttribute( $element, $attribute ) 45 44 {
Note: See TracChangeset
for help on using the changeset viewer.