Hopefully I can ask this question without regaling you kind people in
too many gory details. Here's what I'm trying to do:
- I have a local XML file with a .GPX extension which I downloaded from
www.geocaching.com.
- The file contains a bunch of elements called <WPT>
- Within the WPT elements are a number of other elements <time>, <sym>,
<groundspeak:name>...
- The non-qualified elements come from a schema/namespace at
http://www.topografix.com/GPX/
- The qualified elements come from a schema/namespace at
http://www.groundspeak.com/cache
- I ran xsd.exe with the /c option to generate the classes into which I
want to read my elements using a call to XmlSerializer.DeSerialize.
The problem:
- I can read all of the elements which fall within the topografix
namespace.
- I can't read any of the elements which fall within the groundspeak
namespace.
The questions:
- Is there a way to specifiy a namespace for the .DeSerialize method,
similar to that used with SelectNodes?
- Is there a way to specify nested namespaces with xsd.exe? (in this
case groundspeak is nested within topgrafix)
- Am I using the right tool for this job? I'm pretty new to XML, so if
I'm using a sledgehammer, when I need pliers, don't be shy about
letting me know. :-)
Thanks in advance for any insight you have to share.
-D