Class: Saxon::DocumentBuilder
- Inherits:
-
Object
- Object
- Saxon::DocumentBuilder
- Defined in:
- lib/saxon/document_builder.rb
Overview
Builds XDM objects from XML sources, for use in XSLT or for query and access
Instance Method Summary collapse
-
#build(source) ⇒ Saxon::XDM::Node
The Saxon::XDM::Node representing the root of the document tree.
-
#initialize(s9_document_builder) ⇒ DocumentBuilder
constructor
private
Saxon DocumentBuilder instance to wrap.
-
#to_java ⇒ net.sf.saxon.s9api.DocumentBuilder
The underlying Java Saxon DocumentBuilder instance.
Constructor Details
#initialize(s9_document_builder) ⇒ DocumentBuilder
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Saxon DocumentBuilder instance to wrap
10 11 12 |
# File 'lib/saxon/document_builder.rb', line 10 def initialize(s9_document_builder) @s9_document_builder = s9_document_builder end |
Instance Method Details
#build(source) ⇒ Saxon::XDM::Node
Returns The Saxon::XDM::Node representing the root of the document tree.
18 19 20 |
# File 'lib/saxon/document_builder.rb', line 18 def build(source) XDM::Node.new(@s9_document_builder.build(source.to_java)) end |
#to_java ⇒ net.sf.saxon.s9api.DocumentBuilder
Returns The underlying Java Saxon DocumentBuilder instance.
24 25 26 |
# File 'lib/saxon/document_builder.rb', line 24 def to_java @s9_document_builder end |