forked from libxmljs/libxmljs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxml_attribute.h
More file actions
42 lines (30 loc) · 1.03 KB
/
xml_attribute.h
File metadata and controls
42 lines (30 loc) · 1.03 KB
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
41
42
// 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 Nan::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);
static NAN_METHOD(Namespace);
v8::Local<v8::Value> get_name();
v8::Local<v8::Value> get_value();
void set_value(const char* value);
v8::Local<v8::Value> get_element();
v8::Local<v8::Value> get_namespace();
};
} // namespace libxmljs
#endif // SRC_XML_ATTRIBUTE_H_