XML: Punctuation characters in Node Name
-
Hello all, I'm using MSXML Version 1 to do some XML work from within my MFC application and now a I have a small problem. createElement fails to create the element if the name I pass it to the function contains any punctuation char's other than these 3 characters "_ . -" (excluding the quote ) so if the name contained any of the following "~ ` ! @ # $ % ^ & * ( ) + = , < > / ? : ; " \ | space " the function fails. So I was wondering: 1- is that a general XML specification or is it something specific to Microsoft. 2- is there a way to include any of the previous characters in the Node name. :confused: :confused: thanks in advance Fady
-
Hello all, I'm using MSXML Version 1 to do some XML work from within my MFC application and now a I have a small problem. createElement fails to create the element if the name I pass it to the function contains any punctuation char's other than these 3 characters "_ . -" (excluding the quote ) so if the name contained any of the following "~ ` ! @ # $ % ^ & * ( ) + = , < > / ? : ; " \ | space " the function fails. So I was wondering: 1- is that a general XML specification or is it something specific to Microsoft. 2- is there a way to include any of the previous characters in the Node name. :confused: :confused: thanks in advance Fady
XML, like HTML, requires you to use escape sequences for certain things:
& = &
< = <= >
= = "
' = 'there are a few more, i think. -c ------------------------------ Smaller Animals Software, Inc. http://www.smalleranimals.com
-
Hello all, I'm using MSXML Version 1 to do some XML work from within my MFC application and now a I have a small problem. createElement fails to create the element if the name I pass it to the function contains any punctuation char's other than these 3 characters "_ . -" (excluding the quote ) so if the name contained any of the following "~ ` ! @ # $ % ^ & * ( ) + = , < > / ? : ; " \ | space " the function fails. So I was wondering: 1- is that a general XML specification or is it something specific to Microsoft. 2- is there a way to include any of the previous characters in the Node name. :confused: :confused: thanks in advance Fady
YOU DID WHAT??? Fady you have just depressed me no end. My keyboard is saturated with tears. Do you realise what you've done?? I have spent the last few weeks writing a XML parser that reads a the schema, creates the database then reads in the XML files and you just sit there and casually say 'I'm using MSXML....'. I didn't know there was such a thing. All the ready made stuff costs a fortune. Excuse me a moment, I need to be alone.....*sob* We do it for the joy of seeing the users struggle.