bugDotGNU Portable.NET - Bugs: bug #4194, XmlReader.ReadAttributeValue...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #4194: XmlReader.ReadAttributeValue doesn't work properly

Submitter:  Thong Nguyen <tum>
Submitted:  Sat 05 Jul 2003 12:27:19 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Sat 05 Jul 2003 10:52:35 AM UTC, comment #1: 

fixed.

Adam Ballai <minddog>
Group Member
Sat 05 Jul 2003 12:27:19 AM UTC, 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".

Thong Nguyen <tum>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2003-07-05 minddog Open/ClosedOpen None

Back to the top

Powered by Savane 3.13-02a9.
Corresponding source code