Click here to Skip to main content
15,913,941 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: How to pass multiple values for a param to xsl? Pin
Philip Fitzsimons24-Feb-04 3:23
Philip Fitzsimons24-Feb-04 3:23 
Generalcdata-section-elements Pin
mtone23-Feb-04 5:57
mtone23-Feb-04 5:57 
Generalreading xml schema Pin
Andy H20-Feb-04 5:56
Andy H20-Feb-04 5:56 
GeneralRe: reading xml schema Pin
ian mariano22-Feb-04 11:33
ian mariano22-Feb-04 11:33 
Generalnesting XML tags Pin
Hesham Amin18-Feb-04 22:58
Hesham Amin18-Feb-04 22:58 
GeneralRe: nesting XML tags Pin
ian mariano22-Feb-04 11:42
ian mariano22-Feb-04 11:42 
GeneralRead XSD from embedded resource with VB.NET Pin
mpalmer7818-Feb-04 9:51
mpalmer7818-Feb-04 9:51 
GeneralRe: Read XSD from embedded resource with VB.NET Pin
ian mariano22-Feb-04 11:55
ian mariano22-Feb-04 11:55 
Add the XSD to the project, change it's build type to Embedded Resource. You'll use the Namespace to get at it. For example, if your assembly default namespace is MyDataAccess, the resource base name will be MyDataAccess.MySchemaFile.xsd. You'd use Assembly.GetExecutingAssembly().GetManifestResourceStream to load it.

Unfortunately, SqlXmlCommand only accepts paths to the SchemaPath So, you embed the XSD, then write it out as a temporary file, use it, and delete the temporary file:

//   excuse the C#
string   tmpFilePath = Path.GetTempFileName();

try
{
   TextReader rdr = new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream("MyDataAccess.MySchemaFile.xsd");
   TextWriter wr = new StreamWriter(tmpFilePath, false);

   wr.WriteLine(rdr.ReadToEnd());

   wr.Close();
   rdr.Close();

   //   now tmpFilePath can be used in your SqlXmlCommand.SchemaPath until done, e.g.,
   //   cmd.SchemaPath = tmpFilePath;
}
catch (Exception e)
{
   //   handle the exception
}
finally
{
   //  get rid of that temp file!
   if (File.Exists(tmpFilePath))   File.Delete(tmpFilePath);
}


Ian Mariano - http://www.ian-space.com/


"We are all wave equations in the information matrix of the universe" - me

GeneralADVANCE MACRO Pin
hyperrobster18-Feb-04 2:15
hyperrobster18-Feb-04 2:15 
GeneralC# XML App heirarchy Pin
HologramStudios16-Feb-04 5:29
HologramStudios16-Feb-04 5:29 
GeneralXML in C# Pin
rasarit1713-Feb-04 8:32
rasarit1713-Feb-04 8:32 
GeneralRe: XML in C# Pin
Tom Larsen13-Feb-04 9:07
Tom Larsen13-Feb-04 9:07 
GeneralRe: XML in C# Pin
Not Active13-Feb-04 9:50
mentorNot Active13-Feb-04 9:50 
Generalschema location / nonamespaceSchema Pin
Larry102412-Feb-04 22:46
Larry102412-Feb-04 22:46 
QuestionCan u suggest me an Efficient XML parser?? Pin
P_JAYAPRAKASH12-Feb-04 19:46
P_JAYAPRAKASH12-Feb-04 19:46 
AnswerRe: Can u suggest me an Efficient XML parser?? Pin
Member 87353013-Feb-04 6:08
Member 87353013-Feb-04 6:08 
AnswerRe: Can u suggest me an Efficient XML parser?? Pin
Member 87353013-Feb-04 6:08
Member 87353013-Feb-04 6:08 
GeneralRe: Can u suggest me an Efficient XML parser?? Pin
P_JAYAPRAKASH15-Feb-04 22:09
P_JAYAPRAKASH15-Feb-04 22:09 
Generalautomatically generate xml sample files from xml schema Pin
Anonymous11-Feb-04 3:46
Anonymous11-Feb-04 3:46 
GeneralRe: automatically generate xml sample files from xml schema Pin
Not Active11-Feb-04 7:18
mentorNot Active11-Feb-04 7:18 
GeneralRe: automatically generate xml sample files from xml schema Pin
Anonymous13-Feb-04 4:38
Anonymous13-Feb-04 4:38 
GeneralRe: automatically generate xml sample files from xml schema Pin
Not Active13-Feb-04 6:22
mentorNot Active13-Feb-04 6:22 
GeneralXML reference for Word 2003 Pin
Scott McCulloch10-Feb-04 20:38
Scott McCulloch10-Feb-04 20:38 
GeneralRe: XML reference for Word 2003 Pin
Anonymous17-Feb-04 2:51
Anonymous17-Feb-04 2:51 
GeneralXML Porting Problem Pin
Shenthil9-Feb-04 19:22
Shenthil9-Feb-04 19:22 

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.