Index: class/System.XML/System.Xml/XmlDocument.cs =================================================================== RCS file: /mono/mcs/class/System.XML/System.Xml/XmlDocument.cs,v retrieving revision 1.53 diff -u -r1.53 XmlDocument.cs --- class/System.XML/System.Xml/XmlDocument.cs 13 Jan 2003 20:27:45 -0000 1.53 +++ class/System.XML/System.Xml/XmlDocument.cs 14 Jan 2003 12:07:16 -0000 @@ -695,12 +695,16 @@ XmlNode currentNode = null; // It was originally XmlDocument.Load(reader reader) when mcs was v0.16. int startDepth = reader.Depth; - bool atStart = true; + bool skipRead = false, atStart = true; bool ignoredWhitespace; + skipRead = (reader.NodeType == XmlNodeType.Element); do { ignoredWhitespace = false; - reader.Read (); + if (!skipRead) + reader.Read (); + else + skipRead = false; // This complicated check is because we shouldn't make // improper additional XmlReader.Read() by this method itself. if(atStart && (reader.NodeType == XmlNodeType.EndElement ||