     fileprivate func parseNode(_ node: XMLIndexer, groupStyle: [String: String] = [:]) throws -> Node? {
         var result: Node?
         if let element = node.element {
+            let style = getStyleAttributes(groupStyle, element: element)
+            if style["display"] == "none" {
+                return .none
+            }
             switch element.name {
             case "g":
-                result = try parseGroup(node, groupStyle: groupStyle)
+                result = try parseGroup(node, style: style)
             case "clipPath":
                 if let id = element.allAttributes["id"]?.text, let clip = try parseClip(node) {
                     self.defClip[id] = clip

        }
    }

    fileprivate func parseElement(_ node: XMLIndexer, groupStyle: [String: String] = [:]) throws -> Node? {
        guard let element = node.element else {
            return .none
        }

        let nodeStyle = getStyleAttributes(groupStyle, element: element)
        if nodeStyle["display"] == "none" {
            return .none
        }
        if nodeStyle["visibility"] == "hidden" {
            return .none
        }

        guard let parsedNode = try parseElementInternal(node, groupStyle: nodeStyle) else {
            return .none
        }

        return parsedNode
    }

    fileprivate func parseElementInternal(_ node: XMLIndexer, groupStyle: [String: String] = [:]) throws -> Node? {
        guard let element = node.element else {
            return .none
        }
        let id = node.element?.allAttributes["id"]?.text

        let styleAttributes = groupStyle
        let position = getPosition(element)
        switch element.name {
        case "path":
            if var path = parsePath(node) {
                if let rule = getFillRule(styleAttributes) {
                    path = Path(segments: path.segments, fillRule: rule)
                }

                let mask = try getMask(styleAttributes, locus: path)

                return Shape(form: path, fill: getFillColor(styleAttributes, groupStyle: styleAttributes), stroke: getStroke(styleAttributes, groupStyle: styleAttributes), place: position, opacity: getOpacity(styleAttributes), clip: getClipPath(styleAttributes, locus: path), mask: mask, tag: getTag(element))
            }
        case "line":
            if let line = parseLine(node) {
                let mask = try getMask(styleAttributes, locus: line)
                return Shape(form: line, fill: getFillColor(styleAttributes, groupStyle: styleAttributes), stroke: getStroke(styleAttributes, groupStyle: styleAttributes), place: position, opacity: getOpacity(styleAttributes), clip: getClipPath(styleAttributes, locus: line), mask: mask, tag: getTag(element))
            }
        case "rect":
            if let rect = parseRect(node) {
                let mask = try getMask(styleAttributes, locus: rect)
                return Shape(form: rect, fill: getFillColor(styleAttributes, groupStyle: styleAttributes), stroke: getStroke(styleAttributes, groupStyle: styleAttributes), place: position, opacity: getOpacity(styleAttributes), clip: getClipPath(styleAttributes, locus: rect), mask: mask, tag: getTag(element))
            }
        case "circle":
            if let circle = parseCircle(node) {
                let mask = try getMask(styleAttributes, locus: circle)
                return Shape(form: circle, fill: getFillColor(styleAttributes, groupStyle: styleAttributes), stroke: getStroke(styleAttributes, groupStyle: styleAttributes), place: position, opacity: getOpacity(styleAttributes), clip: getClipPath(styleAttributes, locus: circle), mask: mask, tag: getTag(element))
            }
        case "ellipse":
            if let ellipse = parseEllipse(node) {
                let mask = try getMask(styleAttributes, locus: ellipse)
                return Shape(form: ellipse, fill: getFillColor(styleAttributes, groupStyle: styleAttributes), stroke: getStroke(styleAttributes, groupStyle: styleAttributes), place: position, opacity: getOpacity(styleAttributes), clip: getClipPath(styleAttributes, locus: ellipse), mask: mask, tag: getTag(element))
            }
        case "polygon":
            if let polygon = parsePolygon(node) {
                let mask = try getMask(styleAttributes, locus: polygon)
                return Shape(form: polygon, fill: getFillColor(styleAttributes, groupStyle: styleAttributes), stroke: getStroke(styleAttributes, groupStyle: styleAttributes), place: position, opacity: getOpacity(styleAttributes), clip: getClipPath(styleAttributes, locus: polygon), mask: mask, tag: getTag(element))
            }
        case "polyline":
            if let polyline = parsePolyline(node) {
                let mask = try getMask(styleAttributes, locus: polyline)
                return Shape(form: polyline, fill: getFillColor(styleAttributes, groupStyle: styleAttributes), stroke: getStroke(styleAttributes, groupStyle: styleAttributes), place: position, opacity: getOpacity(styleAttributes), clip: getClipPath(styleAttributes, locus: polyline), mask: mask, tag: getTag(element))
            }
        case "image":
            return parseImage(node, opacity: getOpacity(styleAttributes), pos: position, clip: getClipPath(styleAttributes, locus: nil))
        case "text":
            return parseText(node, textAnchor: getTextAnchor(styleAttributes), fill: getFillColor(styleAttributes, groupStyle: styleAttributes),
                             stroke: getStroke(styleAttributes, groupStyle: styleAttributes), opacity: getOpacity(styleAttributes), fontName: getFontName(styleAttributes), fontSize: getFontSize(styleAttributes), fontWeight: getFontWeight(styleAttributes), pos: position)
        case "use":
            return try parseUse(node, groupStyle: styleAttributes, place: position)
        case "linearGradient", "radialGradient", "fill":
            if let fill = parseFill(node), let id = id {
                defFills[id] = fill

        }
    }

    fileprivate func parseGroup(_ group: XMLIndexer, style: [String: String]) throws -> Group? {
        guard let element = group.element else {
            return .none
        }
        var groupNodes: [Node] = []
        try group.children.forEach { child in
            if let node = try parseNode(child, groupStyle: style) {
                groupNodes.append(node)
