-
Notifications
You must be signed in to change notification settings - Fork 254
/
xml_attribute.h
40 lines (28 loc) · 978 Bytes
/
xml_attribute.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2009, Squish Tech, LLC.
#ifndef SRC_XML_ATTRIBUTE_H_
#define SRC_XML_ATTRIBUTE_H_
#include "libxmljs.h"
#include "xml_element.h"
#include "xml_namespace.h"
namespace libxmljs {
class XmlAttribute : public XmlNode {
public:
explicit XmlAttribute(xmlAttr* node) :
XmlNode(reinterpret_cast<xmlNode*>(node)) {}
static void Initialize(v8::Handle<v8::Object> target);
static v8::Persistent<v8::FunctionTemplate> constructor_template;
static v8::Local<v8::Object> New(xmlNode* xml_obj,
const xmlChar* name, const xmlChar* value);
static v8::Local<v8::Object> New(xmlAttr* attr);
protected:
static NAN_METHOD(New);
static NAN_METHOD(Name);
static NAN_METHOD(Value);
static NAN_METHOD(Node);
v8::Local<v8::Value> get_name();
v8::Local<v8::Value> get_value();
void set_value(const char* value);
v8::Local<v8::Value> get_element();
};
} // namespace libxmljs
#endif // SRC_XML_ATTRIBUTE_H_