Click here to Skip to main content
16,005,149 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionNot understanding or WININET function not working properly ?!! Pin
Benlahrech .Dj8-Oct-06 23:46
Benlahrech .Dj8-Oct-06 23:46 
AnswerRe: Not understanding or WININET function not working properly ?!! Pin
Galatei9-Oct-06 1:44
Galatei9-Oct-06 1:44 
GeneralRe: Great thanks Pin
Benlahrech .Dj9-Oct-06 2:35
Benlahrech .Dj9-Oct-06 2:35 
GeneralRe: Great thanks Pin
Galatei9-Oct-06 3:36
Galatei9-Oct-06 3:36 
QuestionHow to copy data from a stream into a structure Pin
Dhilleswar8-Oct-06 23:34
Dhilleswar8-Oct-06 23:34 
AnswerRe: How to copy data from a stream into a structure Pin
toxcct8-Oct-06 23:44
toxcct8-Oct-06 23:44 
AnswerRe: How to copy data from a stream into a structure Pin
Galatei9-Oct-06 3:43
Galatei9-Oct-06 3:43 
QuestionParsing Dataset.GetXml() with xsl into html... Pin
reet1238-Oct-06 23:24
reet1238-Oct-06 23:24 
hello,
I am in trouble with parsing xml containing dataset data with xsl.
It worked ok if I saved the xml as file on disk, but fails if I want to do it in 'memory', the xsl cannot find the root element named Sales..., it does not find any items.

The c# code:
XslTransform xslTran = new XslTransform();
string xslPath=(string)this.configurationAppSettings.GetValue("EstInvoicePath",typeof (string));
xslTran.Load(xslPath); // loads the xsl

StringWriter swr = new StringWriter();
XmlTextWriter xtw = new XmlTextWriter(swr);
System.Xml.XmlWriter wx=xtw;
Store.Sales.WriteXml(wx,System.Data.XmlWriteMode.IgnoreSchema);

StringReader sr = new StringReader(swr.ToString());
System.Xml.XmlTextReader xtr= new XmlTextReader(sr);
System.Xml.XmlReader xr=xtr;

System.Xml.XPath.XPathDocument doc2= new System.Xml.XPath.XPathDocument(xr,System.Xml.XmlSpace.None);

xslTran.Transform(doc2.CreateNavigator(),null,w);

string textMy=sw.ToString();



the xsl fragment for testing: (Sales should be a root element)

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance/" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:s="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="ms s xsi xsd">
<xsl:output method="html"/>
<xsl:template match="/">
<table>
<tr>
<td>
<img src="gfx/InvoiceLogo.bmp" border="0"/>
</td>
</tr>

<xsl:for-each select="Sales/SlsItem">
<tr>
<td>one Item found</td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>

Can anybody give a hint please...?

AnswerRe: Parsing Dataset.GetXml() with xsl into html... Pin
Hamid_RT19-Oct-06 7:54
Hamid_RT19-Oct-06 7:54 
GeneralRe: Parsing Dataset.GetXml() with xsl into html... Pin
reet12319-Oct-06 20:13
reet12319-Oct-06 20:13 
Questionsql query Pin
zizzzz8-Oct-06 22:53
zizzzz8-Oct-06 22:53 
AnswerRe: sql query Pin
zizzzz8-Oct-06 23:07
zizzzz8-Oct-06 23:07 
GeneralRe: sql query Pin
toxcct8-Oct-06 23:14
toxcct8-Oct-06 23:14 
GeneralRe: sql query Pin
zizzzz8-Oct-06 23:24
zizzzz8-Oct-06 23:24 
GeneralRe: sql query Pin
toxcct8-Oct-06 23:28
toxcct8-Oct-06 23:28 
GeneralRe: sql query Pin
Hamid_RT9-Oct-06 1:25
Hamid_RT9-Oct-06 1:25 
GeneralRe: sql query Pin
David Crow9-Oct-06 4:19
David Crow9-Oct-06 4:19 
GeneralRe: sql query Pin
Hamid_RT9-Oct-06 7:26
Hamid_RT9-Oct-06 7:26 
Question"COleDateTime::GetCurrentTime()" Crashes?? Pin
VCSharp0078-Oct-06 22:30
VCSharp0078-Oct-06 22:30 
AnswerRe: "COleDateTime::GetCurrentTime()" Crashes?? Pin
Stephen Hewitt8-Oct-06 22:42
Stephen Hewitt8-Oct-06 22:42 
GeneralRe: &quot;COleDateTime::GetCurrentTime()&quot; Crashes?? Pin
prasad_som8-Oct-06 22:52
prasad_som8-Oct-06 22:52 
AnswerRe: "COleDateTime::GetCurrentTime()" Crashes?? Pin
Nibu babu thomas9-Oct-06 1:33
Nibu babu thomas9-Oct-06 1:33 
GeneralRe: "COleDateTime::GetCurrentTime()" Crashes?? Pin
David Crow9-Oct-06 4:21
David Crow9-Oct-06 4:21 
GeneralRe: "COleDateTime::GetCurrentTime()" Crashes?? Pin
Nibu babu thomas9-Oct-06 17:22
Nibu babu thomas9-Oct-06 17:22 
GeneralRe: "COleDateTime::GetCurrentTime()" Crashes?? Pin
David Crow10-Oct-06 2:49
David Crow10-Oct-06 2:49 

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.