3 Replies - 2259 Views - Last Post: 08 May 2014 - 11:05 PM

#1 emc2cool  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 27
  • Joined: 16-February 14

Accessing Xml file in a different project

Posted 06 May 2014 - 06:34 PM

First of all, yes, I know about the content pipeline, but don't say anything about it. After all, monogame for the win, right? Cough. BBeck Cough.

Anyhow...

How would I access an Xml file in a different project. For example, I am making a level editor based on Xml, which is stored in the level editor. How would I access this in the actual game?

And the Solution Explorer looks like this:

Game-
Levelsfromleveleditor.xml

LevelEditor-
Levelsinsideleveleditor.xml

Is This A Good Question/Topic? 0
  • +

Replies To: Accessing Xml file in a different project

#2 tHc  Icon User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 62
  • Joined: 12-October 13

Re: Accessing Xml file in a different project

Posted 08 May 2014 - 10:07 AM

I would just use normal C# and get the file.
I never used the content pipeline for any of my xml stuff i did in xna, i just did it the way i would do it in winforms.

This topic has an xna project reading xml if you need it Here

This post has been edited by tHc: 08 May 2014 - 10:12 AM

Was This Post Helpful? 0
  • +
  • -

#3 emc2cool  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 27
  • Joined: 16-February 14

Re: Accessing Xml file in a different project

Posted 08 May 2014 - 04:00 PM

1. How would I do that?
2. I am not going to hardcode the filepath/
Was This Post Helpful? 0
  • +
  • -

#4 tHc  Icon User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 62
  • Joined: 12-October 13

Re: Accessing Xml file in a different project

Posted 08 May 2014 - 11:05 PM

View Postemc2cool, on 08 May 2014 - 04:00 PM, said:

1. How would I do that?
2. I am not going to hardcode the filepath/



1. Look at the code sample provided.
2. You can access the file how ever you like that was just a hard coded example,use what ever method you like to check and read the file.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1