Home All Groups Group Topic Archive Search About

how to parse deeper nested tags in custom control

Author
25 Nov 2005 10:43 PM
SEB
can any one please redirect me to how to use control builder class to parse
the following case (or any other method)
<mycustomcontroltag>
    <item attribute1="x" attribute2="y" ......>
        <subitems>
              <item attribute1="xx" attribute2="yy" ......>
                   <subitems>
                       more deeper nested tags can be here
                    </subitems>
              </item>
        </subitems>
    </item>
   more item tags with deeper nested sub tags can be here
</ycustomcontroltag>

Author
26 Nov 2005 4:27 PM
Brock Allen
I'd suggest looking into the various attributes that control the paraser
such as ParseChildren and PersistenceMode. With those 2 I think you can get
the nesting you're looking for there. Also, I'd suggest checking out "Developing
Microsoft ASP.NET Server Controls and Components", Nikhil Kothari, Vandana
Datye:

http://www.amazon.com/gp/product/0735615829/104-2260158-2667120?v=glance&n=283155&n=507846&s=books&v=glance

-Brock
DevelopMentor
http://staff.develop.com/ballen

Show quoteHide quote
> can any one please redirect me to how to use control builder class to
> parse
> the following case (or any other method)
> <mycustomcontroltag>
> <item attribute1="x" attribute2="y" ......>
> <subitems>
> <item attribute1="xx" attribute2="yy" ......>
> <subitems>
> more deeper nested tags can be here
> </subitems>
> </item>
> </subitems>
> </item>
> more item tags with deeper nested sub tags can be here
> </ycustomcontroltag>
Are all your drivers up to date? click for free checkup

Author
26 Nov 2005 10:56 PM
SEB
Brock,
You are totalement right.
I just added [ParseChildren(true)] [PersistChildren(false)] to both classes
and
[PersistenceMode(PersistenceMode.InnerProperty)] to the properties and it
worked

Thanks a lot.

by the way i could not registered in your blog, is it possible or not?

Show quoteHide quote
"Brock Allen" wrote:

> I'd suggest looking into the various attributes that control the paraser
> such as ParseChildren and PersistenceMode. With those 2 I think you can get
> the nesting you're looking for there. Also, I'd suggest checking out "Developing
> Microsoft ASP.NET Server Controls and Components", Nikhil Kothari, Vandana
> Datye:
>
> http://www.amazon.com/gp/product/0735615829/104-2260158-2667120?v=glance&n=283155&n=507846&s=books&v=glance
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
> > can any one please redirect me to how to use control builder class to
> > parse
> > the following case (or any other method)
> > <mycustomcontroltag>
> > <item attribute1="x" attribute2="y" ......>
> > <subitems>
> > <item attribute1="xx" attribute2="yy" ......>
> > <subitems>
> > more deeper nested tags can be here
> > </subitems>
> > </item>
> > </subitems>
> > </item>
> > more item tags with deeper nested sub tags can be here
> > </ycustomcontroltag>
>
>
>

Bookmark and Share