4
* A few non-inline functions of the C facade to Inkscape::XML::Node.
9
* Lauris Kaplinski <lauris@kaplinski.com>
10
* MenTaLguY <mental@rydia.net>
12
* Copyright (C) 1999-2003 authors
13
* Copyright (C) 2000-2002 Ximian, Inc.
14
* g++ port Copyright (C) 2003 Nathan Hurst
16
* Released under GNU GPL, read the file 'COPYING' for more information
19
#define noREPR_VERBOSE
28
#include "xml/text-node.h"
29
#include "xml/element-node.h"
30
#include "xml/comment-node.h"
31
#include "xml/simple-document.h"
33
using Inkscape::Util::share_string;
35
/// Returns new document having as first child a node named rootname.
36
Inkscape::XML::Document *
37
sp_repr_document_new(char const *rootname)
39
Inkscape::XML::Document *doc = new Inkscape::XML::SimpleDocument();
40
if (!strcmp(rootname, "svg:svg")) {
41
doc->setAttribute("version", "1.0");
42
doc->setAttribute("standalone", "no");
43
Inkscape::XML::Node *comment = doc->createComment(" Created with Inkscape (http://www.inkscape.org/) ");
44
doc->appendChild(comment);
45
Inkscape::GC::release(comment);
48
Inkscape::XML::Node *root = doc->createElement(rootname);
49
doc->appendChild(root);
50
Inkscape::GC::release(root);
58
c-file-style:"stroustrup"
59
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
64
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :