class Nokogiri::XML::ElementContent
Represents the allowed content in an Element Declaration inside a DTD:
<?xml version="1.0"?><?TEST-STYLE PIDATA?> <!DOCTYPE staff SYSTEM "staff.dtd" [ <!ELEMENT div1 (head, (p | list | note)*, div2*)> ]> </root>
ElementContent represents the tree inside the <!ELEMENT> tag shown above that lists the possible content for the div1 tag.
Constants
- ELEMENT
- MULT
- ONCE
-
Possible content occurrences
- OPT
- OR
- PCDATA
-
Possible definitions of type
- PLUS
- SEQ
Attributes
document[R]
Public Instance Methods
# File lib/nokogiri/xml/element_content.rb, line 31 def children [c1, c2].compact end
Get the children of this ElementContent node
name Show source
static VALUE get_name(VALUE self)
{
xmlElementContentPtr elem;
Data_Get_Struct(self, xmlElementContent, elem);
if(!elem->name) return Qnil;
return NOKOGIRI_STR_NEW2(elem->name);
} Get the require element name
occur Show source
prefix Show source
static VALUE get_prefix(VALUE self)
{
xmlElementContentPtr elem;
Data_Get_Struct(self, xmlElementContent, elem);
if(!elem->prefix) return Qnil;
return NOKOGIRI_STR_NEW2(elem->prefix);
} Get the element content namespace prefix.
type Show source
© 2008–2018 Aaron Patterson, Mike Dalessio, Charles Nutter, Sergio Arbeo,
Patrick Mahoney, Yoko Harada, Akinori MUSHA, John Shahid, Lars Kanis
Licensed under the MIT License.