Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. XML: Punctuation characters in Node Name

XML: Punctuation characters in Node Name

Scheduled Pinned Locked Moved IT & Infrastructure
c++xmlhelpquestionannouncement
3 Posts 3 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Fady Elias
    wrote on last edited by
    #1

    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

    C R 2 Replies Last reply
    0
    • F Fady Elias

      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

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • F Fady Elias

        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

        R Offline
        R Offline
        Rassman
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups