Re: Dynamic properties ?

From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 03/26/04


Date: Fri, 26 Mar 2004 05:08:44 -0000

C# newbie <ittraineeforever@yahoo.com> wrote:
> I've a program which runs some XPath queries to retreive information within
> an xml file. it does keep track of every path (in case of finding the item).
> Along with this it should capture attribute information of every visited
> node during a seek procedure.
> I've used an ArrayList and a class which has properties for node name and
> its realted informationi. Regarding to xml structure there is a cateogry and
> ID so we know we have a pattern for it but for number of attributes is
> vary. Some nodes may have 6 attributes and some none and ...
> Is there any way to have dynamic properties in a class ? !! or any solution
> ?

I suggest you use a map such as a Hashtable.

-- 
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


Relevant Pages

  • Problems with BizTalk rules
    ... I'm a bit of a newbie with BizTalk and have come across a problem that I hope ... up using the business rules composer and place the result into a XML file. ...
    (microsoft.public.biztalk.general)
  • Basic Login Page
    ... Hey I'm a bit a newbie when it comes to asp.net and every site I have ... visited has just lead me in circles. ... thing that checks your username against a XML file that stores username pass ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Simple group by with Xquery
    ... I am newbie in Xquery and i would like to do a simple group by date and ... so a piece of my xml file. ... Any suggestion for this ...
    (comp.text.xml)
  • Newbie: XML and database
    ... I'm newbie in java and i have a problem: I have a program written in java which create a XML file. ... My task is to create program which will export from this XML file its contentthen will connect with database and puts it to it. ... As i mentioned I'm newbie so I will be appricate for any help for example sample of code or links where can i get help. ... Mostly i am interested in exporting content of XML file. ...
    (comp.lang.java.databases)