public void CommentTextNode() { const string pre = @"<root>text</root>"; const string post = @"<root><!--text--></root>"; const string xpath = "//text()"; var task = new ConvertToComment(); Run(pre, post, xpath, task); }
public void CommentProcessingInstruction() { const string pre = @"<root><?foo bar ?></root>"; const string post = @"<root><!--<?foo bar ?>--></root>"; const string xpath = "//processing-instruction()"; var task = new ConvertToComment(); Run(pre, post, xpath, task); }
public void CommentCDataSection() { const string pre = @"<root><![CDATA[text]]></root>"; const string post = @"<root><!--<![CDATA[text]]>--></root>"; const string xpath = "//text()"; var task = new ConvertToComment(); Run(pre, post, xpath, task); }
public void CommentElements() { const string pre = @"<root><element /><element /></root>"; const string post = @"<root><!--<element />--><!--<element />--></root>"; const string xpath = "//element"; var task = new ConvertToComment(); Run(pre, post, xpath, task); }
public void CommentAttribute() { const string pre = @"<root><element a=""a"" /><element a=""a"" /></root>"; const string post = @"<root><element><!--a=""a""--></element><element><!--a=""a""--></element></root>"; const string xpath = "//@a"; var task = new ConvertToComment(); Run(pre, post, xpath, task); }