Skip to content

Instantly share code, notes, and snippets.

@pinzolo
Created May 15, 2012 08:56
Show Gist options
  • Save pinzolo/2700187 to your computer and use it in GitHub Desktop.
Save pinzolo/2700187 to your computer and use it in GitHub Desktop.
CDATA セクションを後から追加する
var nameElement = new XElement("name");
if (obj.Name != null)
{
nameElement.ReplaceNodes(new XCData(obj.Name));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment