Exemple #1
0
VALUE
ruby_xml_attribute_last_get(VALUE self) {
  ruby_xml_attribute *rxa;
  Data_Get_Struct(self, ruby_xml_attribute, rxa);
  if (rxa->attribute->last == NULL)
    return(Qnil);
  else
    return(ruby_xml_node_new2(cXMLNode, rxa->xd, rxa->attribute->last));
}
VALUE
ruby_xml_parser_context_node_get(VALUE self) {
  ruby_xml_parser_context *rxpc;
  Data_Get_Struct(self, ruby_xml_parser_context, rxpc);

  if (rxpc->ctxt->node == NULL)
    return(Qnil);
  else
    return(ruby_xml_node_new2(cXMLNode,
			      ruby_xml_document_new(cXMLDocument, rxpc->ctxt->myDoc),
			      rxpc->ctxt->node));
}