Class WsMan::XmlAttr
In: rwsman_xmlattr.c
Parent: Object

XmlAttr represents attributes of xml tags.

Methods

name   ns   ns_prefix   remove   to_s   value  

Public Instance methods

Return name of xml attribute

[Source]

/*
 * call-seq:
 *      XmlAttr.name -> string
 *
 * Return name of xml attribute
 */

static VALUE
xmlattr_name( VALUE self )
{
    WsXmlAttrH attr = rwsman_xmlattr_unpack( self );

    return rb_str_new2( ws_xml_get_attr_name( attr ) );
}

Return namespace of xml attribute

[Source]

/*
 * call-seq:
 *      XmlAttr.ns -> string
 *
 * Return namespace of xml attribute
 */

static VALUE
xmlattr_ns( VALUE self )
{
    WsXmlAttrH attr = rwsman_xmlattr_unpack( self );

    return rb_str_new2( ws_xml_get_attr_ns( attr ) );
}

Return namespace prefix of xml attribute

[Source]

/*
 * call-seq:
 *      XmlAttr.nsprefix -> string
 *
 * Return namespace prefix of xml attribute
 */

static VALUE
xmlattr_ns_prefix( VALUE self )
{
    WsXmlAttrH attr = rwsman_xmlattr_unpack( self );

    return rb_str_new2( ws_xml_get_attr_ns_prefix( attr ) );
}

Remove attribute from XML

[Source]

/*
 * call-seq:
 *      XmlAttr.remove -> nil
 *
 * Remove attribute from XML
 */

static VALUE
xmlattr_remove( VALUE self )
{
    WsXmlAttrH attr = rwsman_xmlattr_unpack( self );
    ws_xml_remove_node_attr( attr );
    return Qnil;
}

Return the value of xml attribute

[Source]

/*
 * call-seq:
 *      XmlAttr.value -> string
 *      XmlAttr.to_s -> string
 *
 * Return the value of xml attribute
 */

static VALUE
xmlattr_value( VALUE self )
{
    WsXmlAttrH attr = rwsman_xmlattr_unpack( self );

    return rb_str_new2( ws_xml_get_attr_value( attr ) );
}

Return the value of xml attribute

[Source]

/*
 * call-seq:
 *      XmlAttr.value -> string
 *      XmlAttr.to_s -> string
 *
 * Return the value of xml attribute
 */

static VALUE
xmlattr_value( VALUE self )
{
    WsXmlAttrH attr = rwsman_xmlattr_unpack( self );

    return rb_str_new2( ws_xml_get_attr_value( attr ) );
}

[Validate]