static XmlNode sReadXmlNode(XmlParser& p, dword style) { XmlNode m; if(p.IsTag()) { m.CreateTag(p.ReadTag()); m.SetAttrsPick(p.PickAttrs()); while(!p.End()) if(!Ignore(p, style)) m.Add() = sReadXmlNode(p, style); return m; } if(p.IsPI()) { m.CreatePI(p.ReadPI()); return m; } if(p.IsDecl()) { m.CreateDecl(p.ReadDecl()); return m; } if(p.IsComment()) { m.CreateComment(p.ReadComment()); return m; } m.CreateText(p.ReadText()); return m; }
XmlNode ParseXML(XmlParser& p, dword style) { XmlNode r; while(!p.IsEof()) if(!Ignore(p, style)) r.Add() = sReadXmlNode(p, style); return r; }