You have to use If you like test for the existence of the node Raj
User 956892
Posts
-
XPath expression not working in xslt stylesheet -
XPath expression not working in xslt stylesheetYou have to use If you like test for the existence of the node Raj
-
XPath expression not working in xslt stylesheetyou have to use if you want test for its existence and select
-
XML Serialization problemHi I am using XML serializationn in C#. I have code like this. public class Doc { [XmlArrayItem (ElementName="TNArray", Type=typeof(ReTN[]))] public object[] Obj; } [XmlRoot("TNA")] public class ReTN {something...} Here I am trying to set XML node as "TNA" instead of class name "ReTN". [XmlRoot("TNA")] works when I serialize single object, that means when I say [XmlElement(Type=typeof(ReTN))]. In single object case I am getting node name as "TNA". If I serialize array of objects as I was doing above it gives class name("ReTN") as node name. Any thoughts. Any help is greatly appreciated. Thanks Raj
-
ArrayList Indexing: HelpI got it. Thnaks Raj
-
ArrayList Indexing: HelpI tried that. Only first element (string)itemList[0] is getting printed. Suppose if count is 10, first element is getting printed 10 times. If I use System.Collections.IEnumerator myEnumerator = itemList.GetEnumerator(); while ( myEnumerator.MoveNext() ) { Console.Write( "\n{0}", myEnumerator.Current ); } I am getting correct output. Thanks & Regards, Raj
-
Array ListHi Everybody, I wrote a class like this public class Node { private int data; private string key; #region Constructors public Node(string key, int data) { this.key = key; this.data = data; } #endregion #region Public Properties public int Value { get { return data; } set { data = value; } } public string Key { get { return key; } set { key = value; } } #endregion } public class test { public static void Main() { ArrayList a = new ArrayList(); Node n = new Node("ab", 1); a.Add(n); PrintValues(a); } public static void PrintValues( IEnumerable myList ) { System.Collections.IEnumerator myEnumerator = myList.GetEnumerator(); while ( myEnumerator.MoveNext() ) Console.Write( "\t{0}", myEnumerator.Current.ToString()); Console.WriteLine(); } } My problem is How do I get and set values for each node in this Array List and How do I print out to the screen. Thanks for your help and time. Raj
-
How to use SortedList.Item PropertyThanks for your reply. I am new to .Net. Trying to understand these properties. DO I have to override this property. I am doing like this, but it doesn't work. In my Sorted list keys are of type string and value is of type int. public override int Item(string myKey) { get { return mySrotedList[myKey]; } set { mySortedList[myKey] = value; } } Thanks for your help and time. Raj
-
How to use SortedList.Item PropertyHi, Can somebody please tell me how to use the "Item" property in System.Collections.SortedList class. I wanted to get and set the value field depending on the key. Thanks Raj