473,326 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Deserialize an XML file with multiple namespaces...

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

Dec 30 '06 #1
0 2346

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Ian Tompsett | last post by:
H I was wondering if it possible for an object to serialize/deserialize itself from XML. I'd be guessing that it would need to use the XmlSerializer class, but that seems to want to create a...
2
by: Hollywood | last post by:
After doing a search through google's archives of this list, I didn't see what I was looking for so here goes... Is it possible to serialize/deserialize multiple objects from a single XML file? ...
2
by: Greg | last post by:
I'm writing a class in C# .... I have a collection calls Reports made up of Report objects. I'm trying to deserialize an XML file that looks like : <Reports> <Report> <Title>some title</Title>...
5
by: Geoff | last post by:
Is it possible to pull a single node (element) out of a complex XML file, using SelectSingleNode(), and then deserialize that node to an object? Could someone please post, or point me to, a...
2
by: tshad | last post by:
If I create multiple .dll files with the same namespace, but different classes. Is this the same thing as creating one file with one Namespace and all the classes in that namespace? If so, is...
2
by: Thomas S | last post by:
Any suggestions on how to deserialize an object from one line of XML? I'm trying to deserialize multiple objects from one XML document, each object on one line of the file. The serialization is...
0
by: PSingh | last post by:
Hi, I know this is a frequently asked question but have tried several combinations and cant seem to figure this out. I am serializing my object as follows: XmlSerializer serializer = new...
1
by: Julien Sobrier | last post by:
Hello, I'm trying to deserialize an RSS feed that can contains 2 namespaces. FOr example, it can contain a tag <imageand/or <itunes:images>. I couldn't figure out how to get both. This simplified...
9
by: =?Utf-8?B?ai5hLiBoYXJyaW1hbg==?= | last post by:
Hi, I have a schema that has an optional element, fieldTag4000Field. If the element is omitted from the XML request, when it is deserialized, it will be null when I check it - which is fine. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.