Thread: Get length of XML node?

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    69

    [solved] Get length of XML node?

    Well I found out what was wrong, I was using .Length( ) instead of .Length





    I'm trying to get the length of content of an XML node using this code currently:

    Code:
    if ( Convert.ToString(oXML.SelectSingleNode(oDoc, buildString)).Length() > 0 )
    {
    	sMailMessage += "class" + strCount + nodeEnd + " = " + Convert.ToString(oXML.SelectSingleNode(oDoc, buildString)) + "\n";
    }
    But VS is complaining about .Length() with
    Code:
    'string.Length' denotes a 'property' where a 'method' was expected
    What am I doing wrong, and is there a simple way to get the length without copying the data out of the XML node into a variable beforehand?
    Last edited by talz13; 01-06-2006 at 12:45 PM. Reason: Solved

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help Debugging my AVL tree program.
    By Nextstopearth in forum C Programming
    Replies: 2
    Last Post: 04-04-2009, 01:48 AM
  2. Unknown memory leak with linked lists...
    By RaDeuX in forum C Programming
    Replies: 6
    Last Post: 12-07-2008, 04:09 AM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM