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. General Programming
  3. XML / XSL
  4. SelectSingleNode '

SelectSingleNode '

Scheduled Pinned Locked Moved XML / XSL
questionalgorithmsxml
3 Posts 2 Posters 0 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.
  • C Offline
    C Offline
    Chris_Green
    wrote on last edited by
    #1

    xn.OuterXml "" Corporate Services Secretary's Office xn.SelectSingleNode("*[@text='Secretary**'**s Office']"); This is probably a stupid question. My xml contains a single quote in Secretary's Office. When searching, I tried replacing ' with ' but this did not work. Is the answer simply that the XML is incorrect?

    G 1 Reply Last reply
    0
    • C Chris_Green

      xn.OuterXml "" Corporate Services Secretary's Office xn.SelectSingleNode("*[@text='Secretary**'**s Office']"); This is probably a stupid question. My xml contains a single quote in Secretary's Office. When searching, I tried replacing ' with ' but this did not work. Is the answer simply that the XML is incorrect?

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      C# does not understand entities! Use escape sequences. xn.SelectSingleNode("*[@text=\"Secretary\'s Office\"]");

      C 1 Reply Last reply
      0
      • G George L Jackson

        C# does not understand entities! Use escape sequences. xn.SelectSingleNode("*[@text=\"Secretary\'s Office\"]");

        C Offline
        C Offline
        Chris_Green
        wrote on last edited by
        #3

        Thanks, that did the trick. However you'd be up the creek if text contained both " and ' If the XML police saw the xml which contained ',",&,<,> wouldn't they give me a ticket?

        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