S
seigo
Hi there,
I use the following code to transform xml to html document:
try
{
XPathDocument myXPathDoc = new XPathDocument(sXmlPath);
XslTransform myXslTrans = new XslTransform();
myXslTrans.Load(sXslPath);
//create the output stream
XmlTextWriter myWriter = new XmlTextWriter("result.html", null);
//do the actual transform of Xml
myXslTrans.Transform(myXPathDoc, null, myWriter, null);
myWriter.Close();
}
catch(Exception e)
{
Console.WriteLine("Exception: {0}", e.ToString());
}
Xml document contains the following namespace:
<Primetime_Screening
xmlns="http://www.medicalhistory.com/PrimetimeScreening" ..>
When this namespace exists there is no data from xml document. And
after I remove such xmlns transformation works fine. I think something
with validation. If I am right how to disable validation during xml
transformation or maybe it's better to remove that namespace from the
xml document and then processing it.
Thanks for any ideas!
Alexander Kleshchevnikov
www.klalex.com
I use the following code to transform xml to html document:
try
{
XPathDocument myXPathDoc = new XPathDocument(sXmlPath);
XslTransform myXslTrans = new XslTransform();
myXslTrans.Load(sXslPath);
//create the output stream
XmlTextWriter myWriter = new XmlTextWriter("result.html", null);
//do the actual transform of Xml
myXslTrans.Transform(myXPathDoc, null, myWriter, null);
myWriter.Close();
}
catch(Exception e)
{
Console.WriteLine("Exception: {0}", e.ToString());
}
Xml document contains the following namespace:
<Primetime_Screening
xmlns="http://www.medicalhistory.com/PrimetimeScreening" ..>
When this namespace exists there is no data from xml document. And
after I remove such xmlns transformation works fine. I think something
with validation. If I am right how to disable validation during xml
transformation or maybe it's better to remove that namespace from the
xml document and then processing it.
Thanks for any ideas!
Alexander Kleshchevnikov
www.klalex.com