Embedded XML File

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tim

    #1

    Embedded XML File

    Hi,

    I have a XML file the I use as config file for a libary. Is there a way to
    use reflection to access the file using XMLReader?

    Thanks


  • Spam Catcher

    #2
    Re: Embedded XML File

    "Tim" <timmy@tim.comw rote in
    news:#NMszL68GH A.5020@TK2MSFTN GP03.phx.gbl:
    Hi,
    >
    I have a XML file the I use as config file for a libary. Is there a
    way to use reflection to access the file using XMLReader?
    Did you embed the file as a local resource?

    Comment

    • Tim

      #3
      Re: Embedded XML File

      Yes

      "Spam Catcher" <spamhoneypot@r ogers.comwrote in message
      news:Xns98618A5 1A39B7usenethon eypotrogers@127 .0.0.1...
      "Tim" <timmy@tim.comw rote in
      news:#NMszL68GH A.5020@TK2MSFTN GP03.phx.gbl:
      >
      >Hi,
      >>
      >I have a XML file the I use as config file for a libary. Is there a
      >way to use reflection to access the file using XMLReader?
      >
      Did you embed the file as a local resource?

      Comment

      • Bela Istok

        #4
        Re: Embedded XML File

        private Assembly thisAssembly;
        public void MethodName(stri ng name)
        {
        if (thisAssembly == null)
        {
        thisAssembly = GetType().Assem bly;
        }
        // Here is the resource stream
        Stream s = thisAssembly.Ge tManifestResour ceStream(name);
        }

        Regards,

        Bela Istok
        "Tim" <timmy@tim.comw rote in message
        news:%23KkLZ368 GHA.1248@TK2MSF TNGP03.phx.gbl. ..
        Yes
        >
        "Spam Catcher" <spamhoneypot@r ogers.comwrote in message
        news:Xns98618A5 1A39B7usenethon eypotrogers@127 .0.0.1...
        >"Tim" <timmy@tim.comw rote in
        >news:#NMszL68G HA.5020@TK2MSFT NGP03.phx.gbl:
        >>
        >>Hi,
        >>>
        >>I have a XML file the I use as config file for a libary. Is there a
        >>way to use reflection to access the file using XMLReader?
        >>
        >Did you embed the file as a local resource?
        >
        >

        Comment

        Working...