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

0
12/30/2006 2:38:38 AM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
338 Views

Similar Articles

[PageSpeed] 20

Reply:

Similar Artilces:

file will not save
One of my excel files will not save. it seems to work ok, but when i try to save it, i get a "document not saved" message. the file cannot be closed unless i agree not to try to save it. any ideas why i cannot save this file? #1. Are you working off a floppy? If yes, then don't do this. Use windows explorer to copy from floppy to harddrive and work from there (and save there). Then use windows explorer to copy back to floppy. #2. You're saving to a location that you don't have permission to save to. #3. Your diskdrive is out of space??? missionary wrote...

Missing File Day 3 No resolution ?
No. Is this file something that can be sent to me? -----Original Message----- From: "Diane Poremsky" <info@cdolive.com> Sent: 4/12/2004 8:15:04 PM Subject: Re: Missing file still.... did you have different versions or suites of office installed? -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com "Kyle" <anonymous@discussions.microsoft.com> wrote in mess...

Access denied opening XML attachment
A user on my network cannot open an xml attachment in Outlook 2003. It works fine in previous versions. It says "access denied. Error processing resource." If the file is saved to a drive, then it opens without a problem. Is there some security configuration that would cause this behavior? I have tested on multiple machines and multiple users to rule out profile or other causes. I have also checked security on the tmp folder the file is trying to open from. Any insight would be helpful. -Paul ...

Switching between multiple open windows
I ran across an option to change how to switch between multiple open windows on my desktop. It was an option to choose between hovering over a window or clicking on it. Thinking that only having to hover over a window to switch to it would save time, I selecting the option to hover... big mistake as it just became a big pain in the a_ _ for me. Now I would like to change back to one-clicking to change between viewed windows but can't remember or find where the option is located. Any help will be appreciated. -- rushl On 2/03/10, rushl posted: > I ran across an opti...

Xml Seralization Ignore attribute
Hey I have having a problem Deserializing a dataset. When I try to deserialize it (See below for my test code) I get the following exception {"Item has already been added. Key in dictionary: \"NextSyncPhase\" Key being added: \"NextSyncPhase\"" } But if I remove either msdata:NextSyncPhase="Hello" or msprop:NextSyncPhase="Hello" (see below) it works fine! Can anyone explain why XmlIgnore doesn't impact anything and why this is happening and how to fix it Thanks P.S. I also tried the following to no affect. XmlAttributeOverrides xOver...

ProbleM: when I restore a mailbox using Exmerge with a pst file, nothing is transferred.
Hi, I am practising Exmerge for a big remote site migration in a couple of weeks. One thing I dont understand is that I can backup one test mailbox fine using Exmerge (I know this works, as I have opened the mailbox pst file within outlook and everything is there), but when I perform the restore using the pst file, nothing happens. There is no error messages, and Emerge goes through the motions (though it finishes supsiciously quick), but when I open the mailbox, no emails have been restored. Although it is great that Exmerge is working for the backup part of the stage, I am disappointed it i...

Excel-Multiple Cells Being Hi-lited
Sometimes when I'm setting up a worksheet and I left-click in a cell, multiple cells in the same column are hi-lited. After it happens the first time, it continues as I move through the worksheet, reducing my ability to get work done considerably. After some trial and error, it seems to occur when I've been adding and/or deleting columns and/or rows, after a header has been installed. I can move throughout the worksheet using the arrow keys, but it is a time consuming and cumbersome technique. I think the version I'm using is Office Professional 2007 (file extensi...

Importing ofx file
I'm using Money 2004 Premium and I was downloading my bank account information in ofx format directly in Money; recently this stopped working and I have to manually import the file into money. Not a big deal, but an annoyance just the same. Does anyone have a suggestion as to a fix for this? tia dennisd In message <QK3kl.3776$rt3.617@newsfe15.iad>, dennis <djd@home.net> writes >I'm using Money 2004 Premium and I was downloading my bank account >information in ofx format directly in Money; recently this stopped working >and I have to manually import the fi...

CtreeCtrl multiple selection
Hi, Is there any simple way (samples) to set a CTreeCtrl has multiple selection feature? Thanks, Chi Try these: http://www.techsoft.no/bendik/ http://www.codeguru.com/Cpp/controls/treeview/misc-advanced/article.php/c723 http://www.codeguru.com/Cpp/controls/treeview/misc-advanced/article.php/c629 -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "Chi" <anonymous@discussions.microsoft.com> wrote in message news:21bd01c4aa63$2e355d70$a501280a@phx.gbl... > Hi, > > Is there any simple way (samples) to set a CTreeCtrl has > multiple selection feature? Thanks, > &...

error when opening .accdb file
I don't think this is a new issue but I can't seem to find the resolution... I get an error when opening my Access 2007 formatted database stating that the file could not be found, though at the same time the file opens successfully. -- Error is intermittent. On occasions where the error does not occur, the file opens normally (I have never had an occasion where the file did not open at all) -- I have only seen the error happen when I have a 'Display Form' set in the Application Options for the 'Current Database' -- The database contains macros, VBA m...

Old emails not displayed (Multiple PC's using same inbox)
I have 2 machines running XP and Outlook 2000. Both mahcines are setup to using the same Exchange Server email account. When i open outlook in one machine all mail are visable is the inbox, and new mail is received correctly. But if i opne Outlook on the second machine my inbox is empty. Any new mails will appear quickly then disappear. I cannot get the second machine to display old emails. If I leave the first machine off, all new mail will stay in the second machines inbox, but if I open outlook on the second machine all mail disappears and is shown in the first machines inbox. A...

Using namespaces? I've some messy nested contexts that I want to clean up...
Hi, I've got the following code structure Class A { ... private: Class B { public: enum C { ENUM X } C MyVar; C MyFunc() } } So for function definitions in B I have to write A::B::C A::B::MyFunc() and for objects of B in A if(pb->MyVar==B::ENUM_X) It's all just a bit messy. Isn't it. Someone please help. Regards. ...

multiple users...again
My wife and I have road runner cable. We each have our own email account. We want to use Outlook 2003 to read our respected emails. I've tried to configure it so that we each have our own password for outlook for privacy of email. As it stands now, when I click on the Outlook shortcut on the desktop it asks for my password. I give it and it opens up my email folder. I tried to create a folder for my wife's email. I put a password on her folder. Now when I open outlook from the shortcut on the desktop, it want's my password. The program opens and then to get to her f...

Default Folder for PST files?
I have a slightly different question relating to the above: I already have my current & archive pst files stored in my own personal folders. When I want to open my archive folder I right-click Outlook Today & select 'Open Outlook Data File'. Everytime, Outlook defaults to its own path (Documents & Settings\User\Local Settings\Application Data\Microsoft\Outlook\) This is really annoying & I would like it to default to opening a customised path, such as C:\Mail\ Any suggestions? -- Cheers, James Goodman Hi James, if you want to displace your pst file, please ...

Importing Contract from .csv file is not working
Hi, I m new to CRM. I have two column in my .CSV file. name and phone number i am trying to imort them to CRM contact Module. Everything happen smooth, i mean mapping of fields. But it does not Import the Contact in to CRM , instead the task goes and sits into the Buld Import Activity. And shows the Status as "Pending". I am using CRM Client and all the services are running..... Please let me know what could be the problem.. Labhesh Shrimali Bangalore - India MCP. Hi you have to change the Log on account for the Workflow Service on the CRM Server Regards, Dirk F ...

Microsoft publisher, how do I set it to show multiple pages?
I'm trying to show more than one page in a single viewing pane. As in for the use of a banner. You'd think that'd be a simple and accesable function. I don't see it anywhere... Print preview has this function. Not sure if this is what you are asking... -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com http://officebeta.iponet.net/en-us/publisher/FX100649111033.aspx "BrickShort" <BrickShort@discussions.microsoft.com> wrote in message news:B42E0DAE-9DB6-4587-A157-3C2F5225FA02@microsoft.com... > I'...

Changing of Cell protections after saving Excel File (2002)
This problem occurs when I protect a document using a macro 4.0 function: =PROTECT.DOCUMENT(TRUE,,,TRUE,TRUE). When I use the function within a macro4.0 macro, on an original file, everything works fine. The sheet has unlocked cells, and when the sheet is protected, it allows me to access those cells. But if I save the file, or save.as another name, then the fun begins. The enable selection of the sheet( view codes) has gone from 0-xlNoRestrictions to -4142- xlNoSelection. This locks me out of doing anything in the sheet. When I unprotect and then re-protect the sheet using the T...

multiple vendors or buying groups
Hello: I have a PO that may eventually be charged, by percentage to more that one vendor. So, they are buying a product that is say 25% to one vendor and 75% to the other. How can we do this? Any suggestions? Additional software? VB? Please let me know. -- Kate Hulit Asyma Systems Inc. ...

Supporting Multiple screen resolution
Hi How i can support multiple screen resolution with MFC? Thanks, Ritu What does this mean? Are you asking about dual monitor support? -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "Ritu chawla" <rituc@momentum-tech.com> wrote in message news:u$xGo0GbDHA.2404@TK2MSFTNGP10.phx.gbl... > Hi > How i can support multiple screen resolution with MFC? > Thanks, > Ritu > > Hi i am working on an application whose GUI becomes completely visible in 1024 x 800 size only. i need to give support or 800 x 600 also. how can i do this. rgds, ritu "Ajay Kalra"...

Bad File Name
I'm getting the Error #52, Bad File Name or Number. FileCopy "C:\PROSERV\DB\Restore.mdb", "C:\PROSERV\BU\Format(Date,""yyyymmdd"") & "".mdb" The file defintely exisits. Could it be the format part thats not right. Thanks DS DS wrote: >I'm getting the Error #52, Bad File Name or Number. > >FileCopy "C:\PROSERV\DB\Restore.mdb", >"C:\PROSERV\BU\Format(Date,""yyyymmdd"") & "".mdb" Hard to tell without knowing what file name you are looking for. Is this the same ...

Multiple Forest Solutions
Hi All, I have a situation where a client is dealing with 2 seperate Win2K3 forests. What type of solutions are available when there is a fully transitive trust relationship between forests and two seperate Exchange orginizations? Some of the things they want to do is share calanders between the forests, share address books, ect. Any help would be welcome! TIA Paul Identity Integration Feature Pack (IIFP) to share the address books. Inter-Organization Free/Busy Replication Tool to share free/busy. If you google them, you should be able to find scenario walkthroughs, in addition t...

when starting excel, .doc & .dat file come up ?????
When I got my new computer at work XP Pro operating, w/2003 Office pro, every time I open Excel, about 12 .doc & .dat file pop up saying not excel format files, and I have to say close to everyone. Then, if automatically defaults to opening an excel file that is someone elses. I have tried running a repair, uninstalling and reinstalling, and nothing works. Never, have I had anything like this happen in my fifteen years. Any suggestions????? HELP it really slows me down. -- thankssomuch The first place I'd check is: Tools|Options|General Tab Make sure that the "at star...

Shared excel file dissapears
We use a shared excel 2000 xls file shared on a w2k server as a production log. we now have about 30 users with about 12 users constantly editing. As we add more users the dissapearances seem to mount up. we are at about 2 a day now. I was wondering what the max amount vs the recommended amount of simultaneous users are. Are there any known issues which would cause excel to mysteriously vanish?? thanks cr -- http://QLiner.com It has been said that democracy is the worst form of government except all the others that have been tried. - Winston Churchill ...

Publisher 2003 file not updated on save
Hi, I have a client using Publisher 2003 under XP. The file she is working on, March.pub, is stored on a Windows 2003 server which she accesses via a mapped P: drive. Yesterday, she worked on a file most of the day and swears she did a Save very often. About 4pm, she saved, printed her work, exited from Publisher, logged off Windows, and went home. Today when she came in she opened the file, only to find that it was missing much of her work. I checked and in fact the latest version on the server is from about 1pm. I had no luck finding a temporary version on the XP machine's C: dr...

I have a e-mail in my delete file that will not deleate.
I have tried to delete a file from my junk mail file, when I try to remove the e-mail I get a message to go to an in box repair tool, with a scanpst.exe. Nothing appears when I type in scanpst.exe and this e-mail I cannot move the e-mail it is frozen Search, to include hidden files for scanpst.exe. You dont run scanpst.exe from within outlook "roger" <roger@discussions.microsoft.com> wrote in message news:EBD25472-D780-4E95-9F7C-1F69E01FE913@microsoft.com... >I have tried to delete a file from my junk mail file, when I try to remove > the e-mail I get a m...