Hi there,
I use the following code to transform xml to html document:
try
{
XPathDocument myXPathDoc = new XPathDocument(s XmlPath);
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.Tran sform(myXPathDo c, null, myWriter, null);
myWriter.Close( );
}
catch(Exception e)
{
Console.WriteLi ne("Exception: {0}", e.ToString());
}
Xml document contains the following namespace:
<Primetime_Scre ening
xmlns="http://www.medicalhist ory.com/PrimetimeScreen ing" ..>
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
I use the following code to transform xml to html document:
try
{
XPathDocument myXPathDoc = new XPathDocument(s XmlPath);
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.Tran sform(myXPathDo c, null, myWriter, null);
myWriter.Close( );
}
catch(Exception e)
{
Console.WriteLi ne("Exception: {0}", e.ToString());
}
Xml document contains the following namespace:
<Primetime_Scre ening
xmlns="http://www.medicalhist ory.com/PrimetimeScreen ing" ..>
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
Comment