quincewyss Posted February 21, 2008 Share Posted February 21, 2008 this line of code is causing an error because I'm using a variable i.e.$var $cb = $dom->createElement($var); The error I'm getting is: Fatal error: Uncaught exception 'DOMException' with message 'Invalid Character Error' in /mnt/gs01/herd02/1703/domains/amerprop.com/html/manager/php/create_xml.php:121 Stack trace: #0 /mnt/gs01/herd02/1703/domains/amerprop.com/html/manager/php/create_xml.php(121): DOMDocument->createElement('') #1 {main} thrown in /mnt/gs01/herd02/1703/domains/amerprop.com/html/manager/php/create_xml.php on line 121 Does anyone know how to plce a ver there without creating an error? Thanks! Quince Quote Link to comment Share on other sites More sharing options...
rhodesa Posted February 21, 2008 Share Posted February 21, 2008 Well...what is the value of $var? Quote Link to comment Share on other sites More sharing options...
quincewyss Posted February 21, 2008 Author Share Posted February 21, 2008 it's was an array with strings i.e. "this_area". I'm now testing it as a single $var = "this_area" Quote Link to comment Share on other sites More sharing options...
rhodesa Posted February 21, 2008 Share Posted February 21, 2008 I don't believe tagnames are allowed to have underscores. Quote Link to comment Share on other sites More sharing options...
quincewyss Posted February 21, 2008 Author Share Posted February 21, 2008 I got it to work. Thanks for the help. Acutally the underscores are working fine in the tag names it's spaces that you can't use i.e. <?xml...?> <group_works> </group_works> <group does not work> </groupdoes not work> The var was named wrong. sometimes it's just one of those simple things overlooked. Thanks again! Quince Quote Link to comment Share on other sites More sharing options...
rhodesa Posted February 21, 2008 Share Posted February 21, 2008 Yeah...I don't know what I was thinking...I use underscores in my XML tags all the time Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.