11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/opensrs/xml_processor/nokogiri.rb', line 11
def self.build(data)
builder = ::Nokogiri::XML::Builder.new
envelope = ::Nokogiri::XML::Node.new("OPS_envelope", builder.doc)
= ::Nokogiri::XML::Node.new("header", builder.doc)
version = ::Nokogiri::XML::Node.new("version", builder.doc)
body = ::Nokogiri::XML::Node.new("body", builder.doc)
data_block = ::Nokogiri::XML::Node.new("data_block", builder.doc)
other_data = encode_data(data, builder.doc)
builder.doc << envelope << << version << '0.9'
envelope << body << data_block << other_data
return builder.to_xml
end
|