let nullt = null_tag ()
(* Defined in XMLTree.cpp *)
-let pcdata = 1
-let attribute = 0
+let document_node = 0
+let attribute = 1
+let pcdata = 2
+let attribute_data= 3
+let document_node_close = 4
+let attribute_close = 5
+let pcdata_close = 6
+let attribute_data_close= 7
+
let pool = Weak.create 1
let tag s = match s with
| "<$>" -> pcdata
| "<@>" -> attribute
+ | "" -> document_node
+ | "<@$>" -> attribute_data
| _ -> register_tag (get_pool()) s
let compare = (-)
let to_string t =
if t == pcdata then "<$>"
+ else if t == attribute_data then "<@$>"
else if t == attribute then "<@>"
else if t == nullt then "<!NIL!>"
else tag_name (get_pool()) t