By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,882 Members | 2,489 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,882 IT Pros & Developers. It's quick & easy.

how to parse deeper nested tags in custom control

P: n/a
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>
Nov 25 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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/073...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>

Nov 26 '05 #2

P: n/a
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?

"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/073...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>


Nov 26 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.