Yes I have tried that. The same error is thrown. There is only one
implementation for that method and that is the one I have presented in the
code for you guys.
-S

On Tue, Oct 13, 2009 at 8:23 PM, Benj Nunez <[email protected]> wrote:

>
> Have you tried placing the namespace as a qualifier like instead of:
>
>  XElement e = PackageUtil.GetXmlDocFromDefaultPackage
>
> do this:
>
>  XElement e = SLUtil.PackageUtil.GetXmlDocFromDefaultPackage
>
>
> You might also want to check if there is another implementation of
> GetXmlDocFromDefaultPackage()
> somewhere in your project just like what santhosh vs is trying to ask
> you earlier.
>
>
> Cheers!
>
>
> Benj
>
>
>
>
>
>
>
>
> On Oct 13, 10:14 am, S <[email protected]> wrote:
> > Hello Benj,
> >                I gave that a try but didnt change a thing. Its still
> > the same.
> >
> > S
> >
> > On Oct 12, 4:41 am, Benj Nunez <[email protected]> wrote:
> >
> > > I examined your code and noticed this line from your GetInventoryInfo
> > > ():
> >
> > > string filename = "Products.xml";
> >
> > > And from the implementation of your GetXmlDocFromDefaultPackage(), you
> > > re-introduced the Products.xml file again like so:
> >
> > > XmlReader reader = XmlReader.Create("Products.xml");
> >
> > > Try changing the argument into this:
> >
> > > XmlReader reader = XmlReader.Create(filename);
> >
> > > See if that helps.
> >
> > > Benj
> >
> > > On Oct 11, 2:50 am, S <[email protected]> wrote:
> >
> > > > public class DataUtil
> > > >         {
> > > >             public static ProductInfo GetInventoryInfo(string sku)
> > > >             {
> > > >                 string filename = "Products.xml";
> > > >                 XElement e = PackageUtil.GetXmlDocFromDefaultPackage
> > > > (filename); // This is the line I get the error.
> >
> > > >             }
> > > >         }
> >
> > > > namespace SLUtil
> > > > {
> > > >     public class PackageUtil
> > > >     {
> > > >         public static XElement GetXmlDocFromDefaultPackage(string
> > > > filename)
> > > >         {
> > > >             XmlReaderSettings settings = new XmlReaderSettings();
> > > >             settings.XmlResolver = new XmlXapResolver();
> > > >             XmlReader reader = XmlReader.Create("Products.xml");
> > > >             XElement element = XElement.Load(reader);
> > > >             return element;
> > > >         }
> >
> > > >     }
> >
> > > > }
> >
> > > > The namespace above is at the top of the file and I am trying to use
> > > > the function but I get this error. Anyone know how to resolve this ?
> >
> > > > Thanks,
> >
> > > > All help appreciated

Reply via email to