Click here to Skip to main content
15,922,533 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to change border (frame) color on a Form? Pin
Dave Kreskowiak22-Feb-07 8:51
mveDave Kreskowiak22-Feb-07 8:51 
GeneralRe: How to change border (frame) color on a Form? Pin
ClarreW22-Feb-07 20:16
ClarreW22-Feb-07 20:16 
QuestionEventHandler not Fire Pin
mfcuser22-Feb-07 5:07
mfcuser22-Feb-07 5:07 
AnswerRe: EventHandler not Fire Pin
Colin Angus Mackay22-Feb-07 5:21
Colin Angus Mackay22-Feb-07 5:21 
GeneralRe: EventHandler not Fire Pin
mfcuser22-Feb-07 5:31
mfcuser22-Feb-07 5:31 
AnswerRe: EventHandler not Fire Pin
Ravi Bhavnani22-Feb-07 6:37
professionalRavi Bhavnani22-Feb-07 6:37 
GeneralRe: EventHandler not Fire Pin
mfcuser22-Feb-07 7:12
mfcuser22-Feb-07 7:12 
QuestionError Message in CD Burning program Pin
shahzeb8522-Feb-07 4:56
shahzeb8522-Feb-07 4:56 
AnswerRe: Error Message in CD Burning program Pin
Judah Gabriel Himango22-Feb-07 4:59
sponsorJudah Gabriel Himango22-Feb-07 4:59 
GeneralRe: Error Message in CD Burning program Pin
shahzeb8522-Feb-07 5:19
shahzeb8522-Feb-07 5:19 
GeneralRe: Error Message in CD Burning program Pin
Ravi Bhavnani22-Feb-07 6:42
professionalRavi Bhavnani22-Feb-07 6:42 
QuestionHow to access XSL Variable or Param in c#? Pin
Abubakarsb22-Feb-07 4:16
Abubakarsb22-Feb-07 4:16 
AnswerRe: How to access XSL Variable or Param in c#? Pin
Pete O'Hanlon22-Feb-07 4:27
mvePete O'Hanlon22-Feb-07 4:27 
AnswerRe: How to access XSL Variable or Param in c#? Pin
Stefan Troschuetz22-Feb-07 4:29
Stefan Troschuetz22-Feb-07 4:29 
QuestionCall Method From External Process Pin
avictus22-Feb-07 4:15
avictus22-Feb-07 4:15 
AnswerRe: Call Method From External Process Pin
Judah Gabriel Himango22-Feb-07 4:50
sponsorJudah Gabriel Himango22-Feb-07 4:50 
AnswerRe: Call Method From External Process Pin
led mike22-Feb-07 4:50
led mike22-Feb-07 4:50 
QuestionHow to access XSL Vaiable in c#? Pin
Abubakarsb22-Feb-07 4:03
Abubakarsb22-Feb-07 4:03 
AnswerRe: How to access XSL Vaiable in c#? Pin
Pete O'Hanlon22-Feb-07 4:34
mvePete O'Hanlon22-Feb-07 4:34 
GeneralRe: How to access XSL Vaiable in c#? Pin
Abubakarsb22-Feb-07 4:51
Abubakarsb22-Feb-07 4:51 
GeneralRe: How to access XSL Vaiable in c#? Pin
Pete O'Hanlon22-Feb-07 5:05
mvePete O'Hanlon22-Feb-07 5:05 
GeneralRe: How to access XSL Vaiable in c#? Pin
Abubakarsb22-Feb-07 10:21
Abubakarsb22-Feb-07 10:21 
GeneralRe: How to access XSL Vaiable in c#? Pin
Pete O'Hanlon22-Feb-07 22:41
mvePete O'Hanlon22-Feb-07 22:41 
GeneralRe: How to access XSL Vaiable in c#? Pin
Abubakarsb22-Feb-07 23:53
Abubakarsb22-Feb-07 23:53 
GeneralRe: How to access XSL Vaiable in c#? Pin
Pete O'Hanlon23-Feb-07 0:23
mvePete O'Hanlon23-Feb-07 0:23 
Right, suppose that you have the following xslt file:

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="testParam">Test value</xsl:param>
</xsl:stylesheet>


To read this in, you could do the following:

public void WriteToConsole()
{
  // Create a new XmlDocument.
  XmlDocument doc = new XmlDocument();
  // Load the Xslt file into the document.
  doc.Load("../../MyTest.xslt");
  // Create the namespace manager and load the document nametable.
  XmlNamespaceManager mgr = new XmlNamespaceManager(doc.NameTable);
  // If you don't add the xsl namespace in, you'll get errors attempting
  // to parse the document.
  string xsltMgr = "xsl";
  string xsltUri = "http://www.w3.org/1999/XSL/Transform";
  mgr.AddNamespace(xsltMgr, xsltUri);

  try
  {
    // Select the node that you want, and don't forget the namespace
    XmlNode node = doc.SelectSingleNode("//xsl:param[@name='testParam']", mgr);
    // Write out the inner text.
    Console.WriteLine(node.InnerText);
  }
  catch (Exception ex)
  {
    Console.WriteLine(ex.Message);
  }
}



the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer

Deja View - the feeling that you've seen this post before.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.