Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3397812
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:34:25+00:00 2026-05-18T04:34:25+00:00

This is my requirement i need to deserialize an object and then i need

  • 0

This is my requirement
i need to deserialize an object and then i need to do some xml parsing(i know how it sounds)
So here is my code

XmlTextReader myFileReader = new XmlTextReader(path); 
XmlSerializer serializer = new XmlSerializer(typeof(MyType)); 
MyType par = serializer.Deserialize(myFileReader)  as MyType;

XElement qListenerParXml = XElement.Load(qListenerPar);

When i try to load the reader again i’m getting exception because the reader cursor is at the end.
My question is how do i return it back to the beginning?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:34:25+00:00Added an answer on May 18, 2026 at 4:34 am

    XmlTextReader is forward-only, you cannot rewind the cursor on the data.

    You could do this by going over the data again with a new instance of XmlTextReader, or by loading it as an XmlDocument.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Wondering if I could get some advice and direction on this following requirement: Need
Trying to determine best way to code this requirement : Need to insert rows
This requirement is just for simplicity for developers and beautiful code. I'm building a
I have this requirement. I need to design a table with 3 rows (each
I have this requirement that i need to Update/Save all records from DatabaseA on
I know how to use TTImageView, but now I have this requirement in my
I need some advice. (For those who have already read this before I have
I have this requirement where I need to find the full path for the
I need to create a thumbnail image with transparent rounded corners. Before this requirement
I'm stuck with this requirement that I need to try X times before calling

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.