[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pnet-developers] [bug #4194] XmlReader.ReadAttributeValue doesn't work
From: |
nobody |
Subject: |
[Pnet-developers] [bug #4194] XmlReader.ReadAttributeValue doesn't work properly |
Date: |
Fri, 04 Jul 2003 20:27:20 -0400 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; .NET CLR 1.0.3705; .NET CLR 1.1.4322) |
=================== BUG #4194: FULL BUG SNAPSHOT ===================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4194&group_id=353
Submitted by: tum Project: DotGNU Portable.NET
Submitted on: Sat 07/05/2003 at 00:27
Category: None Severity: 5 - Major
Bug Group: None Resolution: None
Assigned to: None Status: Open
Summary: XmlReader.ReadAttributeValue doesn't work properly
Original Submission: A call to ReadAttributeValue should move the reader into
a state where you can potentially read nodes "inside" an attribute. If the
attribute only contains text (no entity references etc) then ReadAttributeValue
should "move" the reader into a a text node.
Here's some code to demonstrate what I mean:
using System;
using System.IO;
using System.Xml;
using System.Text;
public class TestXml
{
public static void Main()
{
string xml;
xml = @"<?xml version='1.0'?>
<element a1='pok' a2='wer'/>
";
XmlReader reader = new XmlTextReader(new StringReader(xml));
for (;;)
{
reader.MoveToContent();
if (reader.NodeType == XmlNodeType.Element)
{
reader.MoveToFirstAttribute();
reader.ReadAttributeValue();
Console.WriteLine(reader.NodeType);
return;
}
}
}
}
It should print out "Text" but it prints out "Attribute".
No Followups Have Been Posted
CC list is empty
No files currently attached
For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4194&group_id=353
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Pnet-developers] [bug #4194] XmlReader.ReadAttributeValue doesn't work properly,
nobody <=