Going nuts trying to create custom Xml classes

I'm currently writing a C# class library to represent a certain XML that 
we're using.  What I want to do is to allow our developers to instantiate 
these classes and then pass the XmlDocument class (actually, a class that 
inherits XmlDocument) to a web service for additional processing.

The problem I'm having seems straight forward, but I can't figure out a 
straight forward way of handling the issue.

The DTD states that certain elements are required while others are not.  In 
addition, many tags have child tags that must be presented in a specific 
order.  For example, given the following fragment:

<myparent>
  <mychild1>data1</mychild1>
  <mychild2>data2</mychild2>  <!-- optional tag -->
  <mychild3>data3</mychild3> <!-- optional tag -->
</myparent>

In this fragment, the child elements have to be presented in this order (if 
all of the tags are present).

In my class (that's inheriting XmlElement), how to I add the child tags to 
the parent to ensure that the order is preserved?  If I add them all when 
the parent is instantiated (in the constructor), then I may have to remove 
some of the child tags when the XML gets generated later on.  If I don't add 
them in the constructor, when do I add them?

Any help would be greatly appreciated.



0
sspringer (1)
7/5/2007 5:32:24 PM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
746 Views

Similar Articles

[PageSpeed] 32

Reply:

Similar Artilces:

Where Do Messages Go??
If there isn't a kink in my program and it's behaving as it should, I hope someone can answer my questions. Messages disappear. Example: I e-mailed a friend, who e-mailed me back. When I answered that response, I could find no trace of it in "sent mail" or anywhere else, and the item in my inbox maintained its appearance as unread mail. If I click "mark read" it disappears altogether. I've lost several messages this way. Also I seem to be unable to drag a message from one folder to another. It gets lost in the transporter, never to be seen agai...

Send e-mail to customer on creation of an appointment
I would like to create a workflow which will send an e-mail when an appointment is created. That e-mail should be sent to the required attendee of that appointment. It looks as if it is only possible to send e-mail to owner/owner manager. Does anyone know how this can be done? Remco Hi Remco, Did you find a solution for this? I am having a similar problem where I want to send an email to the account owner of a case but can only pick the owner of the case. Thanks Simon "Remco" wrote: > I would like to create a workflow which will send an e-mail when an > appointm...

Where do the Archives Go?
I cannot find the information Outlook claims to have archived for me. Yes I know how to display the archived calendar, but it's blank. Any ideas? Thanks! I use XP, and Office 2007. "6Sigma 5s No Clue" <6Sigma5sNoClue@discussions.microsoft.com> wrote in message news:B239B721-DCF1-4337-947D-B325D4BF0E4A@microsoft.com... >I cannot find the information Outlook claims to have archived for me. Yes I > know how to display the archived calendar, but it's blank. Any ideas? > Thanks! > > I use XP, and Office 2007. Why do you think Outook is arch...

Invalid object name when I try to create a scaler udf in a stored procedure.
I am trying to create a report that shows a company name, all the advisors in that company, then the company's stats (there should be one row for each company). Each of these come from a different table. The advisors are currently being listed as one per line, which means the company name and the stats are all being repeated unneccesarily. I want to concatinate the advisors, so that all the ones that belong to the same company show in the same cell. I wrote this UDF which is located right before my SP: CREATE FUNCTION [dbo].[ConcatAdvisorNames](@Company as varchar(20)) RETURNS VA...

Price/cost fields need to be able to go beyond 5 decimals.
When we receive product it comes in $ per metric ton, which we convert to $ per lb.. We sometimes receive product in millions of lbs. in one line item, when we convert from $/MT to lb./MT the limit of 5 decimal places in a currency field causes pretty lare rounding errors to occur in our extended cost. This causes our posted cost in GP to be different than what we actually pay our vendors. The ability to extend beyond 5 decimals in the currency field would solve the problem, but for now it is not possible in GP. ---------------- This post is a suggestion for Microsoft, and Microsof...

Multiple calendars, how to choose which one meetings go into
Hi I have 3 calendars setup in outlook XP , when someone sends me a meeting request how can i change which calendar the meeting goes into, at the moment they all go into what i guess is the default calendar which i want to change to a different one any ideas? thanks Chris You really can't change it. Outlook treats certain folders special. "Chris S" <fred@fred.com> wrote in message news:43cf7167$0$23294$db0fefd9@news.zen.co.uk... > Hi > > I have 3 calendars setup in outlook XP , when someone sends me a meeting > request how can i change which calend...

Trouble creating new smtp address for user
I am trying to move an email address assigned from one user to a different user in the same OU. I removed the address from the original user and tried to add it to the new user but it keeps saying This Email address already exists in this organization ID no: c10312e7 Microsoft Active Direcotry - Exchange Extension I thought maybe since I just removed it I had to wait a bit to re-add that address...so about 40 minutes later I try it and same thing. I checked all the other accounts in that OU and none of them have that address assigned. I even did a search on the system for any accounts with...

Error while trying to close Activities
While online and offline in CRM - we receive the 'General' Error message while attempting this. We've been experiencing this for almost 5 months and still no resolution ;( Try to re-install SFO-Client. That did it for me. "TGin" <TGin@discussions.microsoft.com> wrote in message news:<CA1F475C-FA5C-44B5-A37C-B6DF7D08D926@microsoft.com>... > While online and offline in CRM - we receive the 'General' Error message > while attempting this. We've been experiencing this for almost 5 months and > still no resolution ;( Hi Daniel....

Trying to calculate volume?
Hello, I was wondering if there was a way to calculate volume in a query. I have the formula (I only have length and width measurements). Here is the formula (4/3) x (Pi) x (W to the power of 2)/4) x (L/2). Seems simple except for the squared part...any help would be much appreciated. Use the shift-6 symbol ("^") to represent raising a number to a power. Or, since squaring is just multiplying a number by itself, put that number/expression in twice, separated by a *. In your example, (W*W). Regards Jeff Boyce Microsoft Office/Access MVP "Bec_FS" <BecFS@discus...

Custom format macro?
Can I write a macro to format a number? I have a bunch of cells containing time intervals stored as floating point numbers in units of days. These are not dates, but are stored in the same format. Some examples: 1 1 day 2.5 2.5 days or 2 days, 12 hours 0.125 3 hours 0.020833 30 minutes and so on. These values are calculated. I would like to display them as nnn.n u where "nnn.n" is a floating point number formatted to 1 decimal place and "u" is a character indicating the units (Y=years, D=days, H=hours, M=minutes, S=seconds). The ...

custom autofilter does not work
Hi there, I have Microsoft Excel 2003 version (dont know if makes a difference but i mention it). I have a list with numbers and I have Autofilter activated but when I selected Custom and then the option "begins with" or "contains" it does not bring any result. Even when I selected the hole number that I want to filter (although I want all the numbers that start with some common digits with this one). I dont know if this version has any problem with that thing. I have used the same feature in the past with previous versions and it worked just fine. If anybody has s...

Go to page
I have a long document and need to go the certain pages without having to scroll down. How do I go to a particular page? Thanks This is a multi-part message in MIME format. ------=_NextPart_000_0040_01CAEE07.56832EE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Press Ctrl+G to open the GoTo dialog, and enter the page number. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "richard" <rmk@wo...

Here we go again
Well, once again CashEdge is not connecting/syncing with Money and MSN Money. I guess I won't run right out to buy Money 2007. Even if the software were an improvement over M06, it cannot be any better than the weakest link in the sync chain. A known problem, David -- and not unique to the version of Money. Look at http://moneycentral.msn.com/common/networkstatus.asp -- Michael Gordon MVP "David Haynes" <nospam@nowhere.com> wrote in message news:eNopg0UzGHA.1252@TK2MSFTNGP04.phx.gbl... > Well, once again CashEdge is not connecting/syncing with Money and MSN ...

Creating Mailboxes Error 9554
Windows 2003 Microsoft Exchange 2003 SP1 Windows 2000 Domain When I create a new user in ADUC it doesn't create the mailbox properly. It is like the request is made but something in Exchange is not tripping off. I went to check the event log and found a Error 9554. So I go and check to make sure the permissions were being propogated. The permissions for the user are correctly propogating. The permissions for the users mailbox are not. The only user that the mailbox shows is self. I can go in and alter the permissions to mimic everyone elses mailbox as a quick fix but want to...

Not all emails going out??
For the last week or so, send few, my emails have not been going out, or not going out to all parties I access from my address book. Just tested by sending one to myself...went fine. Sent second to a single party and cc myself. Did not receive my cc in outlook, but it did show up in my iphone. Tried a third to a group of people...through a single address book contact, and nothing happened. I am strictkly novice, but have not had this problem before. Any ideas??? -- Thanx! Wilson Kobel;110315 Wrote: > For the last week or so, send few, my emails have not been going...

If Public Folders are going away..
What would be the best/simplest solution for a user requesting a group calendar to be used within Outlook. Ordinarily i would advise them to create a calendar within the Public Folders hierarchy and then assign access rights to anyone who needs it. I understand though that Public Folders will be history with the next release of Exchange. The only thing i can think of is to create a new mailbox, share the calendar, and then walk users through adding it to their Outlook folder list. I suspect this isn't the best way though. Any recommendations out there? All clients are running ...

Quit creating duplicate desktop icons when doing upgrades/hotfix
Upon any sort of upgrade or hotfix, RMS creates a whole new set of desktop icons. What a pain! Pls fix. Ask if we want to create new desktop icons, pls. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/...

Multiple Contacts Folders: can I sync them so I can go back to use
I got the bright idea of making 2 more Contacts folders so that I could be better organized. I decided not to use the old Contacts folder and instead was putting changes in the two news one, which would be used for different purposes. The reason I came up with this is so that I could get around using categories (temporarily) because a lot of them disappeared for some unknown reason. Any, now the problem is that in order for me to set up Contacts to be tracked in the Journal, I have to use the Contacts folder I initially had (the default folder), and Windows Mobile (for my Motorola Q)...

Serialization of a derived class to the same element as the base class
I have the following two classes' the second derived from the first. Each time 'myclass' is added it adds an element. The second class is the same in, except it includes more methods. What I want to be able to do is add the class element even if I use my 'wizclass'. public class myclass { {...} } public class wizclass : myclass{ {...} } Here is my serialization attribute, even if I cast 'wizclass' back to 'myclass' I still get an type exception. [System.Xml.Serialization.XmlElementAttribute("class", Type=typeof(myclass))] public ArrayList Ent...

If stmt
I would like to create an 'if' statement which includes the condition if the statement is true, then 'go to' a new location. Is this possible??? How about a worksheet function: =IF(A1="asdf",HYPERLINK("#"&CELL("address",'sheet 1'!A4),"go1"), HYPERLINK("#"&CELL("address",'sheet 2'!C9),"go2")) (One cell) (I used two sheet names with spaces--just to show the apostrophes.) You may want to modify the cell's style to be hyperlink. (Format|Cells|Style) MM wrote: >...

Virtual user supports in exchange server (a email account without actually creating a email account)
I want to provide email service to my customer, but I don't want to create real user account and email account for each one. for example, I want to assign email like xyz123@mycompany.com to my customer, but I don't really have a email account named "xyz123" setup for it. Still, I want to be able to look at all the new email in the exchange server and extract those emails and doing somework accordingly. Does anyone know if Exchange server support this feature? If not, any other window based email server support it? Thank you so much for the help.. --Xin Chen In news:...

Computer does not go into hibernation
In Power Options I enabled hibernation and asked the computer to go into = hibernation after 30 minutes. Well, it doesn't.=20 The complete settings are as follows: Turn off monitor: after 5 min. Turn off hard disks: after 15 minutes. System standby: after 25 minutes. System hibernates: after 30 minutes. What may be the reason of the computer not going into hibernation? TIA Humpty Usually something running in the background. Are you running a virus program that starts when the computer is idle? "Humpty Dumpty" <sorry@antispam.net> wrote in messa...

Changing Default Server When Creating a New Mailbox
Hello, I was wondering for Exchange 2003 if there is a way to change the server that is highlighted first when you go to Exchange Tasks --> Create Mailbox. It appears that the first Exchange server in the list that is alphabetically the highest is displayed. I was wondering if there are any attributes I can change in ADSIEdit or AD Schema to change the default displayed server to a different one. Thanks in advance. ...

Trying to install Internet Mail Service
Hi, I'm trying to install Internet Mail Service on a WIN2k SP4 Exchange 5.5 SP4 machine, but keep getting an error stating that 'Self Registration of the dll c:\winnt\system32\inetcomm.dll failed' I have tried to manually register it as per MS KB 233219. Have tried replacing the .dll file with one from a similar 5.5 Exchange box in our Organisation and have downloaded one also. Apart from the obvious answer which would be to move to AD (Which we will be v soon!) has anyone got any ideas?? are you attempting to do this on the Exchange server, or via the Exchange Administrator...

create 1 field from multiple records
I have a table for sales and another for countries. There is one record for a sale, but multiple countries in the country table that match the sale. Is it possible to take the multiple countries and concatenate them all into 1 field? In other words, I have a widget that was sold in the US, England, and Canada. For the record I am creating in a query, can I a field that puts those together as US, England, Canada. Thanks for the help. Keith S wrote: >I have a table for sales and another for countries. There is one record for >a sale, but multiple countries in the country tabl...