Пример #1
0
 public void UpperCaseMixedElements()
 {
     const string pre = @"<root a=""a"">a<![CDATA[value]]><?foo bar?><!--comment-->b</root>";
     const string post = pre;
     const string xpath = "root";
     var task = new UpperCase();
     Run(pre, post, xpath, task);
 }
Пример #2
0
 public void UpperCaseElementsCDataValues()
 {
     const string pre = @"<root attribute=""""><![CDATA[value]]></root>";
     const string post = @"<root attribute=""""><![CDATA[VALUE]]></root>";
     const string xpath = "root";
     var task = new UpperCase();
     Run(pre, post, xpath, task);
 }
Пример #3
0
 public void UpperCaseElementsValues()
 {
     const string pre = @"<root attribute="""">value</root>";
     const string post = @"<root attribute="""">VALUE</root>";
     const string xpath = "root";
     var task = new UpperCase();
     Run(pre, post, xpath, task);
 }
Пример #4
0
 public void UpperCaseElementRecursively()
 {
     const string pre = @"<root><child><child-of-child>foo</child-of-child></child></root>";
     const string post = pre;
     const string xpath = "root";
     var task = new UpperCase();
     Run(pre, post, xpath, task);
 }
Пример #5
0
 public void UpperCaseComments()
 {
     const string pre = @"<root><!--comment--></root>";
     const string post = @"<root><!--COMMENT--></root>";
     const string xpath = "//comment()";
     var task = new UpperCase();
     Run(pre, post, xpath, task);
 }
Пример #6
0
 public void UpperCaseCDataSections()
 {
     const string pre = @"<root><![CDATA[text]]></root>";
     const string post = @"<root><![CDATA[TEXT]]></root>";
     const string xpath = "//text()";
     var task = new UpperCase();
     Run(pre, post, xpath, task);
 }
Пример #7
0
 public void UpperCaseAttributeValues()
 {
     const string pre = @"<root attribute=""value""></root>";
     const string post = @"<root attribute=""VALUE""></root>";
     const string xpath = "root/@attribute";
     var task = new UpperCase();
     Run(pre, post, xpath, task);
 }
Пример #8
0
 public void UpperCaseTextNodes()
 {
     const string pre = @"<root>text</root>";
     const string post = @"<root>TEXT</root>";
     const string xpath = "//text()";
     var task = new UpperCase();
     Run(pre, post, xpath, task);
 }
Пример #9
0
 public void UpperCaseProcessingInstructions()
 {
     const string pre = @"<root><?foo bar ?></root>";
     const string post = @"<root><?foo BAR ?></root>";
     const string xpath = "//processing-instruction()";
     var task = new UpperCase();
     Run(pre, post, xpath, task);
 }
Пример #10
0
 public void UpperCaseTextNodesWithRegularExpression()
 {
     const string pre = @"<root>text text</root>";
     const string post = @"<root>Text Text</root>";
     const string xpath = "//text()";
     var task = new UpperCase {Pattern = @"\b[a-z]{1}"};
     Run(pre, post, xpath, task);
 }