Nathoushka
-
1/18/2011 10:35:09 AM
Access node's firstchild & Access property that contains string
I have 2 questions for 2 different things, but I thought it'd be better to ask both on same thread than split them into 2 threads.
First, is there a nice way to access the first child of a folder/page/etc.
Example: Root --Folder1 ----Page1 ----Page2 ----Page3 --Folder2
I want to acces the page1 node throught the Folder1 node. I want to select the first node (first child) in the list (from Folder1) and then get the values I need from it.
Secondly, I wanted to know if there is a way to do SQL-Like request on document type properties. In fact, I have various document types with a same part of property (they all contains "Title" in the property name, ex: ArticleTitle) and a if/else is not the best way to do in case they add a new document type, it won't be considered until I change it.
I wanted to know if there is a way I can obtain it like:
string[] myProperty = node.SearchProperties("Title"); // Obtains "ArticleTitle" node.getValue(myProperty[0]);
Or something like that...
Thanks!
|