         }
 
         return resultPoints
+    }
+    
+    private func parseImage(image: XMLIndexer, pos: Transform = Transform()) -> Image? {
+        guard let element = image.element, link = element.attributes["xlink:href"] else {
+            return .None
+        }
+        let position = pos.move(getDoubleValue(element, attribute: "x") ?? 0, my: getDoubleValue(element, attribute: "y") ?? 0)
+        return Image(src: link, w: getIntValue(element, attribute: "width") ?? 0, h: getIntValue(element, attribute: "height") ?? 0, pos: position)
+    }
+    
+    private func parseText(text: XMLIndexer, fill: Fill?, fontName: String?, fontSize: Int?, italic: Bool?, bold: Bool?, underline: Bool?, strike: Bool?, pos: Transform = Transform()) -> Text? {
+        guard let element = text.element, string = element.text else {
+            return .None
+        }
+        let font = Font(
+            name: fontName ?? "Serif",
+            size: fontSize ?? 12,
+            bold: bold ?? false,
+            italic: italic ?? false,
+            underline: underline ?? false,
+            strike: strike ?? false)
+        let position = pos.move(getDoubleValue(element, attribute: "x") ?? 0, my: getDoubleValue(element, attribute: "y") ?? 0)
+        return Text(text: string, font: font, fill: fill ?? Color.black, pos: position)
     }
 
     private func parsePath(path: XMLIndexer) -> Path? {

    let curveToRelative = Character("c")
    let closePathAbsolute = Character("Z")
    let closePathRelative = Character("z")
    let availableStyleAttributes = ["stroke", "stroke-width", "fill"]

    private let xmlString: String
    private let initialPosition: Transform

        return .None
    }

    private func parseElement(node: XMLIndexer, groupStyle: [String: String] = [:], groupPosition: Transform = Transform()) -> Node? {
        if let element = node.element {
            let styleAttributes = getStyleAttributes(groupStyle, element: element)
            let position = getPosition(groupPosition, element: element)
            switch element.name {
            case "path":
                if let path = parsePath(node) {
                    return Shape(form: path, fill: getFillColor(styleAttributes), stroke: getStroke(styleAttributes), pos: position)
                }
            case "line":
                if let line = parseLine(node) {
                    return Shape(form: line, fill: getFillColor(styleAttributes), stroke: getStroke(styleAttributes), pos: position)
                }
            case "rect":
                if let rect = parseRect(node) {
                    return Shape(form: rect, fill: getFillColor(styleAttributes), stroke: getStroke(styleAttributes), pos: position)
                }
            case "circle":
                if let circle = parseCircle(node) {
                    return Shape(form: circle, fill: getFillColor(styleAttributes), stroke: getStroke(styleAttributes), pos: position)
                }
            case "ellipse":
                if let ellipse = parseEllipse(node) {
                    return Shape(form: ellipse, fill: getFillColor(styleAttributes), stroke: getStroke(styleAttributes), pos: position)
                }
            case "polygon":
                if let polygon = parsePolygon(node) {
                    return Shape(form: polygon, fill: getFillColor(styleAttributes), stroke: getStroke(styleAttributes), pos: position)
                }
            case "polyline":
                if let polyline = parsePolyline(node) {
                    return Shape(form: polyline, fill: getFillColor(styleAttributes), stroke: getStroke(styleAttributes), pos: position)
                }
            case "image":
                return parseImage(node, pos: position)
            case "text":
                return parseText(node, fill: getFillColor(styleAttributes), fontName: getFontName(styleAttributes), fontSize: getFontSize(styleAttributes),
                                 italic: getFontStyle(styleAttributes, style: "italic"), bold: getFontWeight(styleAttributes, style: "bold"),
                                 underline: getTextDecoration(styleAttributes, decoration: "underline"), strike: getTextDecoration(styleAttributes, decoration: "line-through"), pos: position)
            default:
                print("SVG parsing error. Shape \(element.name) not supported")
                return .None
