.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Google base: Non-child nodes with the same name

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :ASP.Net

Not and xml expert, so please be kind to me.  I'm trying to consume a google base fomatted feed (for these purposes just bulding a long string).  I'm having a problem with stuff on my main/first node level with the same name e.g. "g:feature".  Any xml I've dealt with before would have these as child nodes to, say, "g:features" and I would just loop through them as such.  Can anyone help?

Dim doc As New XmlDocument()

        ' Load data  

        ' Get nodes with XPath  
        nodeList = doc.SelectNodes("/rss/channel/item")

            'loop through XML nodes and display them
            For Each node As XmlNode In nodeList

                texter += node.Item("title").InnerXml.ToString
                texter += "<br />"
                texter += node.Item("g:feature").InnerXml.ToString
                texter += "<br />"

View Complete Post

More Related Resource Links

Display homepage node along with child nodes


If the first Sitemap node is your homepage/default and all other nodes are supposed to be children / grandchildren of the first sitemap node in a web.sitemap, how do I set up my web.sitemap to enable me to display my cssFriendlyMenu with the homepage node along with the nodes that are 1 level down from it at the same time as in :

Home   Products   Services   About us


...or is it not possible to have the first sitemap node displayed along with the nodes that are 1 level down from it?  Do I need to have a different starting node rather than my homepage node?

Child nodes not allowed.


Hi everyone.

I'm positive that, by now, a lot of people have run into this problem but even with all the forum posts with great answers, I still can't seem to get to the bottom of it. Here are some specs:

  • Windows Server 2008
  • Visual Studio 2008 x86

So here's the issue:

I have VS2008 installed on the server listed above. This is our development server and everything is created and tested here. I have created an asp.net application, tested it on the dev. environment and everything works great. When I try to migrate this application up to our Quality Assurance environment (which is Windows Server 2003), I get the error in the subject title.

I've read many things that can be the cause of this and I'm positive that I know 2 ways of fixing it. One is from this post: Simple web site problem on Vista, related to <providerOption>, and the other is making sure 3.5 framework is at least installed on the server in question. There are 2 reasons why I'm unable to use these 2 methods:

  • The patches from DVD that I'm supposed to install won't let me install them. Upon double clicking I recieve a message saying the "Update is not applicable to your computer"
  • I don't have permission to install 3.5 frame

WPF- Treeview--How to add child nodes-- a Bizzare problem-- plz help

so here it is.... in WPF ... Treeview control -- i can add nodes under root node, using XAML code  which is static i hav to add the nodes, using C# code which is dynamic. For Example: Menu Table MenuId       Name       ParentId     1           Country         0     2           India             1     3           USA              1     4           AP                2     5           UP                2     6           California      3     7           Newyork       3 In my C# Code i took a class file in that, i declared the menu() method of type DataTable. Method menu() :- I created a temptable (using DATATABLE CLASS) with same fields(using CLONE()) and filled it with MENU table data and returned that temptable. So now i have data with me. Based on ParentID i can retrieve the child values. but how to add those values to TREEVIEW as its ITEMS There is no---> " treeview1.Items[0].Items.Add() " thing in WPF--- n its creating problem to me. Hw can i do dat...? i dnt knw which Methods , Properties , Classes  to Use. Ex:       + COUNTRY             + INDIA                    AP                    UP              +USA                    Lusiana                    Nwyrk Please help. Thank you. Beginner in WPF..... VENU.Beginner in WPF.......VENU

Multiple Child Nodes with For XML Path

I am trying to generate this format of xml and having difficulties because of the properties section. I can have unlimited number of properties and "For XML" tells me it can't generate the same node "Properties/@Name". I have tried several methods online, but can't seem to get it to work. OptionLists> <OptionList Name="Functions"> <Option Value="L9496"> <Properties Name="Description" Value="L9496 - Privacy Lock With Indicator" /> <Properties Name="Locked" Value="False" /> </Option> <Option Value="LV9040" /> <Option Value="L9485" /> </OptionList> </OptionLists>   My SQL currently looks like this: SELECT 'Functions' as '@Name', ( Select coalesce(nullif(No_,''),'NONE') "Option/@Value", Case NO_ when isNull(nullif(NO_,''),null) Then 1 Else 99 END "Option/@Order", 'TRUE' "Option/@Visible", 'FALSE' "Option/@Locked", '' "Option/@ToolTip", '' "Option/@ImageLink", '' "Option/@InfoMessage", 'QtySensitive' "Option/Properties/@Name", Case [Quantity Sensitive] When 0 Then 'False' When 1 Then 'True' End "Option/Propert

WPF TreeView child nodes - collection is not a member of the first level nodes object



I was wondering if i could use a TreeView to display data from 2 separate collections where both collections are members of the same object. For example i have a view model that has 2 observable collections:



Each model has a property Brand which specifies the brand for each model. What i want to do is bind the first level to the Brands collection and the second level to the Models collection and specify a filter.

Thanks in advance.

add child nodes to treeview control

 private void updateTreeView(IMongoCollection one)
      ICursor coll= one.FindAll();
      int count=0;
      foreach (Document document in coll.Documents)
       TreeNode mynode= treeView1.Nodes.Add(count.ToString());
       enumerateValues(document.GetEnumerator(), mynode);



    private void enumerateValues(IEnumerator<KeyValuePair<string, object>> iEnumerator, TreeNode parentnode)
      //TreeNode childnode = parentnode.Add(iEnumerator.Current.Key.ToString());
       if(iEnumerator is IEnumerable)
         // ADD THE KEY
         TreeNode childNode = parentnode.Nodes.Add(iEnumerator.Current.Key);

         enumerateValues(iEnumerator.Current.Value, childNode);
         /// add the value

Displaying + on treeview node even when no child nodes are present


I have a treeview control that is working great, except that I would like the behavior of some nodes to display the + even though no child nodes exist yet. Meaning, I want my treeview control to look like this:

- RootNode
    + Node1
    + Node2
    + Node3

However, Nodes 1, 2, and 3 do not have any child nodes. From what I can see the + or - does not display if there are no child nodes, but I would like to see the + appear even though there are no child nodes. I want to do this because I want to create the child nodes upon expanding the parent node (Node1 for example).

Is this possible?



Adding child nodes to its parent



I would like to add child nodes to its parents using pattern visitor to build tree .

 public interface IVisitor
        void Visit(File file);
        void Visit(Level_1 level);
        void Visit(Level_2 level);
        void Visit(Level_3 level);
        void Visit(Level_4 level);
        void Visit(Level_2 level);
        void Visit(Root root);

 public class TreeViewBuilderVisitor : IVisitor
        private TreeNode _treeNode;

        public TreeNode TreeNode
            get { return _treeNode; }
            set { _treeNode = value; }
        private TreeView _treeview;

        public TreeViewBuilderVisitor(TreeView treeview)
            _treeview = treeview;

        public void Visit(File file)
             TreeNode faTreeNode = new TreeNode(file.Name);

        /// <summary>
        /// </summary>

Problem to delete treeNode along with child nodes.



i have a treeView which display organization chart as hierarchical view. i want when end-user remove a treeNode, all childs of the selected node also being removed and then update database. to do this, i've used this code :

private void btnDeleteReceiver_Click(object sender, EventArgs e)

private void DeleteNode(TreeNode node)
      foreach (TreeNode childNode in node.Nodes)
      TestDataSet.ReceiversRow receiver = node.Tag as TestDataSet.ReceiversRow;

as u see in above code, i have a recursive method which delete all child nodes of the parentNode. but i'm facing a problem to delete all childs of the node. this loop could not iterate all childs node correctly. i don't know

creating nested nodes child elemnts using vb.net


i am creating a xml file with asp.net
i need to create nodes which are nested .

             <student no="1">


<student no="2">

<student no="3">


i need to loop it ,
i tried using the loop but i get "Token StartElement in state Epilog would result in an invalid XML document"
as i feel the my start elemnt tag  & end elemnt tag doesnot match . any eaxample of such nodes & sub nodes with loops

GridView Parent Child View with JQuery Effects

I was just checked how to add some more cool effects to the GridView control using JQuery. In this post I will display parent-child data in the GridView control with some help of the wonderful JQuery library.

Let's first populate the GridView control.

5 GridView Themes Based on Google's Personalized Homepage (igoogle)

One of the silly features I have found that I like about igoogle is how the pages color palette changes depending upon the time of day. So as the day progresses from morning to afternoon to evening the colors on the page change as well. Like I said, I know this is a silly feature, but I like it. And I have asked around a little bit and seems like other people like it to. To get a better idea of how the colors change, here are the background images from a few of the HTML elements.

GridView control to show master-child or master-slave data, written in c#, asp.net

I previously made a master slave datagrid using Visual Studio 2003 .Net (original article) that would allow users to show data to clients using collapse and expand features. These features however did not carry over to gridview for many users. This tutorial will explaing how to create a collapsable/expandable gridview in frameworks 2.0 and higher

Get more then google search from here

Just make it home page and enjoy more then google search you not only get google result and prizes for searching but also free ebooks and link from here like orkut,facebook,twitter,yahoomail etc...


how to make a dropdownlist looks like google search box


dear all...

any idea how to do that ?

Thnx in advance

How to change the default page base class?


I've tried setting the <pages pageBaseType="DynamicWebPage" /> value in web.config, but when I response.write out the page type, I'm still getting Microsoft.WebPages.WebPage.

I'm simply trying to sub-class WebPage and add some additional functionality such as a dynamic PageData dictionary similar to Phil Haack's dynamic ViewData dictionary.



Display column from child table. Possible ?



I'am using dnamic entity with EF4. On a list page of a table, I would like to display a column containing information from a child table of the current element. Sample :

Order List :

Order Data | Required Date | Shipped Date | etc... | ... | Customer Name (foreign key with tostring() method override) | Customer Postal Code (Column that I want to add) |

I don't known how to do that. Is it possible ? Maybe I have to to create my own Metadata proxy that will add dynamicly a column on the MetaColumn list of the table.

Does someone have an easier or better idea ?

Thank you for any help.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend