Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / July 2006

Tip: Looking for answers? Try searching our database.

XmlReader.Create returns none

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
raj - 18 Jul 2006 21:38 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.