i have this code which is upgraded to work with 2.0 and works great with
framework 1.0 and 1.1 without the upgraded code.
//2.0 code//
public static XmlReader RtfToXml( string Rtf )
{
if ( moForm == null )
moForm = new frmRTFtoXML();
string sDocBookXml = moForm.RtfToXml( Rtf );
XmlDocument xDoc = new XmlDocument();
xDoc.PreserveWhitespace = true;
xDoc.LoadXml( sDocBookXml );
XmlDocument doc = new XmlDocument();
xsltDocBookToPara.Transform(xDoc, null,
doc.CreateNavigator().AppendChild());
XmlReader xr = doc.CreateNavigator().ReadSubtree();
return xr;
}
the variable doc has both innerxml and outerxml.
However, the xmlreader is none. i cannot figure out why. I have tried many
ways such as writting xml to stream and reading back with xmlreader, etc.
None work. I always have xmlreader as none.
Also i have used xml spy to validate my xml schema and input. It transforms
them correctly. The transformation from xml spy is the same as what i get by
doing "xsltDocBookToPara.Transform(xDoc, null,
doc.CreateNavigator().AppendChild());".
what could i be doing wrong!
thanks
Zafar Abbas - 19 Jul 2006 17:20 GMT
Could you print which node you are on before the calling to ReadSubtree? If
you are not on a valid node on which ReadSubtree should be called, you might
get a NULL reader.
> i have this code which is upgraded to work with 2.0 and works great with
> framework 1.0 and 1.1 without the upgraded code.
[quoted text clipped - 41 lines]
>
> thanks
raj - 20 Jul 2006 18:20 GMT
Hey
Thanks for the reply...
I figured it out...it was a problem not due to any nodes but due to upgrade
to the .net 2.0 xml model.
in 1.0 and 1.1 the scripts (xslt with java embeded in it) worked well.
however with 2.0 you have to use xmluriresolver and give right permissions
for the scripts to be able to run. Wihtout the scripts being able to run we
were getting a null back for a value in Xslt.
:)
thanks again
> Could you print which node you are on before the calling to ReadSubtree?
> If
[quoted text clipped - 50 lines]
>>
>> thanks