Click here to Skip to main content
15,894,405 members
Home / Discussions / C#
   

C#

 
AnswerRe: Help with Prining Pin
Lutosław29-Sep-07 10:51
Lutosław29-Sep-07 10:51 
GeneralRe: Help with Prining Pin
MumbleB29-Sep-07 11:44
MumbleB29-Sep-07 11:44 
GeneralRe: Help with Prining Pin
Lutosław29-Sep-07 12:21
Lutosław29-Sep-07 12:21 
GeneralRe: Help with Prining Pin
Paul Conrad29-Sep-07 13:09
professionalPaul Conrad29-Sep-07 13:09 
GeneralRe: Help with Prining Pin
MumbleB30-Sep-07 3:41
MumbleB30-Sep-07 3:41 
GeneralRe: Help with Prining Pin
Lutosław30-Sep-07 5:33
Lutosław30-Sep-07 5:33 
GeneralRe: Help with Prining Pin
MumbleB30-Sep-07 10:57
MumbleB30-Sep-07 10:57 
Questionbarcode Pin
k36madman29-Sep-07 8:12
k36madman29-Sep-07 8:12 
AnswerRe: barcode Pin
martin_hughes29-Sep-07 10:15
martin_hughes29-Sep-07 10:15 
GeneralRe: barcode Pin
k36madman29-Sep-07 12:02
k36madman29-Sep-07 12:02 
GeneralRe: barcode Pin
martin_hughes29-Sep-07 12:31
martin_hughes29-Sep-07 12:31 
GeneralRe: barcode Pin
k36madman29-Sep-07 14:39
k36madman29-Sep-07 14:39 
GeneralRe: barcode Pin
GuyThiebaut30-Sep-07 8:25
professionalGuyThiebaut30-Sep-07 8:25 
GeneralRe: barcode Pin
k36madman30-Sep-07 10:43
k36madman30-Sep-07 10:43 
QuestionRadio Buttons Pin
picasso229-Sep-07 7:52
picasso229-Sep-07 7:52 
AnswerRe: Radio Buttons Pin
Lutosław29-Sep-07 8:59
Lutosław29-Sep-07 8:59 
QuestionObject reference not set to an instance of an object. Pin
anydie29-Sep-07 7:20
anydie29-Sep-07 7:20 
AnswerRe: Object reference not set to an instance of an object. Pin
Luc Pattyn29-Sep-07 7:55
sitebuilderLuc Pattyn29-Sep-07 7:55 
AnswerRe: Object reference not set to an instance of an object. Pin
Guffa29-Sep-07 7:57
Guffa29-Sep-07 7:57 
QuestionxmlTextReader [modified] Pin
jon-8029-Sep-07 6:46
professionaljon-8029-Sep-07 6:46 
Why is the value of the tags not being read when the code reads System.xml.XmlTextReader.Text property?

Hence within element <column> column 1 is not being read as text


Note: "sample.xml" is not being rendered well. Tried using HTML escape characters to display a sample but it was unsuccessful. See the code below.

using System;
using System.Xml;

namespace ReadXMLfromFile
{
    /// <summary>
    /// Summary description for Class1.
    /// </summary>
    class Class1
    {
        static void Main(string[] args)
        {
            XmlTextReader reader = new XmlTextReader("sample.xml");
            while (reader.Read())
            {
{
       switch (reader.NodeType) 
       {
           case XmlNodeType.Element: // The node is an element.
               Console.Write("<" + reader.Name);

               while (reader.MoveToNextAttribute()) // Read the attributes.
                Console.Write(" " + reader.Name + "='" + reader.Value + "'");
                Console.WriteLine(">");
               break;
            case XmlNodeType.Text: //Display the text in each element. SHOULD THIS READ THE TEXT VALUE OF NODES?
               Console.WriteLine (reader.Value);
               break;
            case XmlNodeType. EndElement: //Display the end of the element.
                Console.Write("");
                break;
       }}}}}}

(source: MSDN)

sample.xml
----------

<database schema-name="products">

	<column data-type="text" name="Code" pk="true" fkreferences="Product.Code">    column 1
	<column data-type="int" name="Qty">	  column 2
  <column data-type="currency" name="CostPrice">    column 3
	<table name="ProductsInStock">		</table>

	<column data-type="text" name="ProductID" pk="true">	column 1
  <column data-type="text" name="Description">	column 2
  <table name="Product">	</table>

------------------
 


 -- modified at 13:26 Saturday 29th September, 2007 


 -- modified at 5:24 Sunday 30th September, 2007 


 -- modified at 5:26 Sunday 30th September, 2007 

<div class="ForumSig">Jon</div>

Questionimage DBNull Pin
TAREQ F ABUZUHRI29-Sep-07 6:19
TAREQ F ABUZUHRI29-Sep-07 6:19 
AnswerRe: image DBNull Pin
Christian Graus29-Sep-07 11:33
protectorChristian Graus29-Sep-07 11:33 
Question.NET arbitrary precision arithmetic library Pin
thepersonof29-Sep-07 5:55
thepersonof29-Sep-07 5:55 
AnswerRe: .NET arbitrary precision arithmetic library Pin
thepersonof29-Sep-07 8:01
thepersonof29-Sep-07 8:01 
GeneralRe: .NET arbitrary precision arithmetic library Pin
Luc Pattyn29-Sep-07 8:07
sitebuilderLuc Pattyn29-Sep-07 8:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.