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 8779467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:47:41+00:00 2026-06-13T19:47:41+00:00

I am develop win8 metro app and I need to load xml file to

  • 0

I am develop win8 metro app and I need to load xml file to present on app.
But I got a problem after loading xml files located in folders.

I know I can use xmlreader to read a xml file in app itself, but I don’t know how to load a file in “My Document” or any other folder out of app. So I google for it and I found I can using await XmlDocument.LoadFromFileAsync(file) to load but I don’t know how to make xmlreader to read the file I loaded in xmldocument.

Or there is a way xmlreader can load xml files out of app?

I’ve tried to put the file path for xmlreader but it always respond “File Not Found” and the route is start from my develop directory but not from the path I set.

Can any one help me ?

below is how I deal with xmlreader, so I hope the file from xmldocument could be handled by this way:

            XmlReader reader = XmlReader.Create(@"Data/question/" + file_name);
            while (reader.Read())
            {
                //                subject.Text += "start-node:\n";
                switch (reader.NodeType)
                {
                    case XmlNodeType.Element:
                        Element = reader.Name;

                        //                        subject.Text += String.Format("Element: {0}\n", reader.Name);
                        if (reader.HasAttributes)
                        {
                            //                            subject.Text += String.Format("Attributes of " + reader.Name + "\n");
                            while (reader.MoveToNextAttribute())
                            {
                                switch (Element)
                                {
                                    case "SUBJECT":
                                        switch (reader.Name)
                                        {
                                            case "TYPE":
                                                type = int.Parse(reader.Value);
                                                if (start_type == 999)
                                                {
                                                    start_type = type;
                                                    Save_para("Start_Type", start_type);
                                                }
                                                last_sn += sn;
                                                sn = 0;
                                                break;
                                            case "QUANTITY":
                                                quantity = int.Parse(reader.Value);
                                                question[type] = new string[quantity + 1][];

                                            ....
  • 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-06-13T19:47:42+00:00Added an answer on June 13, 2026 at 7:47 pm

    I found a solution from here, I use a StringReader to read my xmldocument and loaded by xmlreader.

                StorageFolder folder = await KnownFolders.DocumentsLibrary.CreateFolderAsync("documents", CreationCollisionOption.OpenIfExists);
                StorageFile file = await folder.GetFileAsync(file_name);
                XmlDocument reade = await XmlDocument.LoadFromFileAsync(file);
                //XmlReader reader = XmlReader.Create(@"Data/question/" + file_name);
                XmlReader reader = XmlReader.Create(new StringReader(reade.GetXml()));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I develop one book reader application which play audio according to page, but problem
I develop a software that uses FlatOPC files. I need to manipulate several parts
Does Win8 App Store accept application written in c++? I develop wp7 app using
im develop app with phonegap and create index.html -> html5 and of course use
I develop application in Java and Spring AOP. Anything is good, but I've created
I develop an flex application and I need your help. The window must be
Develop a Rails app on your Mac. Have a virtual Windows box using Parallels
I develop in python with glade and pygtk since 3 months, but even before
I develop a code to download a MP3 file from server. The code works
I develop my project at ~/Dropbox/db/. I need to move the folder continuously to

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.