示例#1
0
        void ReadNode()
        {
            Debug.Assert(Name == "node");
            string      id = GetAttr("id");
            GraphmlNode glnode;

            _graphmlNodes[id] = glnode = new GraphmlNode(id);
            FillFields(glnode);
        }
示例#2
0
 void FillFields(GraphmlNode glnode)
 {
     do
     {
         XmlRead();
         while (Name == "data")
         {
             var val = GetAttr("key");
             if (val == "v_pubid")
             {
                 glnode.Pubid = _xmlReader.ReadElementContentAsString();
             }
             if (val == "label")
             {
                 glnode.Fullname = _xmlReader.ReadElementContentAsString();
             }
             Skip();
             XmlRead();
         }
     } while (Name == "data");
     ReadEndElement();
 }
        void FillFields(GraphmlNode glnode) {
            do {
                XmlRead();
                while (Name == "data") {
                    var val = GetAttr("key");
                    if (val == "v_pubid") {
                        glnode.Pubid = _xmlReader.ReadElementContentAsString();
                    }
                    if (val == "label") {
                        glnode.Fullname = _xmlReader.ReadElementContentAsString();
                    }
                    Skip();
                    XmlRead();
                }

            } while (Name == "data");
            ReadEndElement();
        }
 void ReadNode() {
     Debug.Assert(Name == "node");
     string id = GetAttr("id");
     GraphmlNode glnode;
     _graphmlNodes[id] = glnode = new GraphmlNode(id);
     FillFields(glnode);
 }