Example #1
0
 public void ConvertProcessingInstructionToText()
 {
     const string pre = @"<root><?pi text?></root>";
     const string post = @"<root>text</root>";
     const string xpath = "//processing-instruction()";
     var task = new ConvertToText();
     Run(pre, post, xpath, task);
 }
Example #2
0
 public void ConvertProcessingInstructionWithSpecialCharactersToText()
 {
     const string pre = @"<root><?pi <text>?></root>";
     const string post = @"<root>&lt;text&gt;</root>";
     const string xpath = "//processing-instruction()";
     var task = new ConvertToText();
     Run(pre, post, xpath, task);
 }
Example #3
0
 public void ConvertElementToText()
 {
     const string pre = @"<root><foo>bar</foo></root>";
     const string post = @"<root>bar</root>";
     const string xpath = "//foo";
     var task = new ConvertToText();
     Run(pre, post, xpath, task);
 }
Example #4
0
 public void ConvertCommentWithSpecialCharactersToText()
 {
     const string pre = @"<root><!--<text>--></root>";
     const string post = @"<root>&lt;text&gt;</root>";
     const string xpath = "//comment()";
     var task = new ConvertToText();
     Run(pre, post, xpath, task);
 }
Example #5
0
 public void ConvertCommentToText()
 {
     const string pre = @"<root><!--text--></root>";
     const string post = @"<root>text</root>";
     const string xpath = "//comment()";
     var task = new ConvertToText();
     Run(pre, post, xpath, task);
 }
Example #6
0
 public void ConvertCDataSectionWithSpecialCharactersToText()
 {
     const string pre = @"<root><![CDATA[<text>]]></root>";
     const string post = @"<root>&lt;text&gt;</root>";
     const string xpath = "//text()";
     var task = new ConvertToText();
     Run(pre, post, xpath, task);
 }
Example #7
0
 public void ConvertCDataSectionToText()
 {
     const string pre = @"<root><![CDATA[text]]></root>";
     const string post = @"<root>text</root>";
     const string xpath = "//text()";
     var task = new ConvertToText();
     Run(pre, post, xpath, task);
 }