SelectSingleNode '
-
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?
-
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?
C# does not understand entities! Use escape sequences. xn.SelectSingleNode("*[@text=\"Secretary\'s Office\"]");
-
C# does not understand entities! Use escape sequences. xn.SelectSingleNode("*[@text=\"Secretary\'s Office\"]");
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?