Module: Gsf

Defined in:
lib/gsf/input.rb,
lib/gsf.rb,
lib/gsf/loader.rb

Overview

Copyright (C) 2016 Ruby-GNOME2 Project Team

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Defined Under Namespace

Modules: ClipFormat, ClipFormatWindows, Error, OutputCsvQuotingMode, XMLContent, ZipCompressionMethod Classes: Blob, ClipData, DocMetaData, DocPropVector, Infile, InfileMSOle, InfileMSVBA, InfileStdio, InfileTar, InfileZip, Input, InputGZip, InputGio, InputHTTP, InputMemory, InputProxy, InputStdio, InputTextline, Loader, ODFOut, Outfile, OutfileMSOle, OutfileOpenPkg, OutfileStdio, OutfileZip, Output, OutputBzip, OutputCsv, OutputGZip, OutputGio, OutputIOChannel, OutputIconv, OutputMemory, OutputStdio, SharedMemory, StructuredBlob, XMLOut

Constant Summary collapse

META_NAME_BYTE_COUNT =

(Integer) Count of bytes in the document.

gsf:byte-count
META_NAME_CASE_SENSITIVE =

(Unsigned Integer) Identifier representing the case-sensitiveness. of what ?? why is it an integer ??

gsf:case-sensitivity
META_NAME_CATEGORY =

(String) Category of the document. example???

gsf:category
META_NAME_CELL_COUNT =

(Integer) Count of cells in the spread-sheet document, if appropriate.

gsf:cell-count
META_NAME_CHARACTER_COUNT =

(Integer) Count of characters in the document.

TODO See how to sync this with ODF's document-statistic

gsf:character-count
META_NAME_CODEPAGE =

(UnsignedShort) The MS codepage to encode strings for metadata 1.14.0 Clarified that this is unique from _NAME_CODEPAGE in msole

msole:codepage
META_NAME_COMPANY =

(String) Name of the company/organization that the "CREATOR" entity is associated with.

1.14.1 Moved from "gsf:company" to "dc:publisher".

dc:publisher
META_NAME_CREATOR =

(String) An entity primarily responsible for making the content of the resource typically a person, organization, or service.

1.14.0 Moved from "gsf" to "dc".

dc:creator
META_NAME_DATE_CREATED =

(Date as ISO String) A date associated with an event in the life cycle of the resource (creation/publication date). Moved from gsf:date-created to meta:creation-date. This way can be used correctly by OpenDocument and Gnumeric.

meta:creation-date
META_NAME_DATE_MODIFIED =

(GsfTimestamp) The last time this document was saved.

1.14.0 Moved from dc:date-modified to dc:date.

dc:date
META_NAME_DESCRIPTION =

(String) An account of the content of the resource.

dc:description
META_NAME_DICTIONARY =

(None) Reserved name (PID) for Dictionary

gsf:dictionary
META_NAME_DOCUMENT_PARTS =

(Vector of strings) Names of the 'interesting' parts of the document. In spreadsheets this is a list of the sheet names, and the named expressions. From MSOLE

gsf:document-parts
META_NAME_EDITING_DURATION =

(Date as ISO String) The total-time taken until the last modification. Moved from "gsf" to "meta". This way can be used correctly by OpenDocument and Gnumeric.

meta:editing-duration
META_NAME_GENERATOR =

(String) The application that generated this document. AbiWord, Gnumeric, etc...

1.14.0 Moved from "gsf" to "meta".

meta:generator
META_NAME_HEADING_PAIRS =

(Vector of string value pairs stored in alternating elements) Store the counts of objects in the document as names 'worksheet' and count '4' From MSOLE

gsf:heading-pairs
META_NAME_HIDDEN_SLIDE_COUNT =

(Integer) Count of hidden-slides in the presentation document.

gsf:hidden-slide-count
META_NAME_IMAGE_COUNT =

(Integer) Count of images in the document, if appropriate.

gsf:image-count
META_NAME_INITIAL_CREATOR =

(String) Specifies the name of the person who created the document initially. 1.14.0 Moved from "gsf" to "meta".

meta:initial-creator
META_NAME_KEYWORD =

(String) Searchable, indexable keywords. Similar to PDF keywords or HTML's meta block.

meta:keyword
META_NAME_KEYWORDS =

(GsfDocPropVector of String) Searchable, indexable keywords. Similar to PDF keywords or HTML's meta block.

dc:keywords
META_NAME_LANGUAGE =

(String) The locale language of the intellectual content of the resource (basically xx_YY form for us). 1.14.0 Clarified that this is unique from _NAME_CODEPAGE in msole

dc:language
META_NAME_LAST_PRINTED =

(GSF_META_NAME_HEADING_PAIRS) The last time this document was printed.

1.14.0 Moved from "gsf" to "dc". 1.14.1 Moved back to "gsf" from "dc".

gsf:last-printed
META_NAME_LAST_SAVED_BY =

(String) The entity that made the last change to the document, typically a person, organization, or service.

gsf:last-saved-by
META_NAME_LINE_COUNT =

(Integer) Count of liness in the document.

gsf:line-count
gsf:links-dirty
META_NAME_LOCALE_SYSTEM_DEFAULT =

(Unsigned Integer) Identifier representing the default system locale.

gsf:default-locale
META_NAME_MANAGER =

(String) Name of the manager of "CREATOR" entity.

gsf:manager
META_NAME_MM_CLIP_COUNT =

(Integer) Count of "multi-media" clips in the document.

gsf:MM-clip-count
META_NAME_MSOLE_UNKNOWN_17 =

(Unknown) User-defined name

msole:unknown-doc-17
META_NAME_MSOLE_UNKNOWN_18 =

(Unknown) User-defined name

msole:unknown-doc-18
META_NAME_MSOLE_UNKNOWN_19 =

(Boolean) User-defined name

msole:unknown-doc-19
META_NAME_MSOLE_UNKNOWN_20 =

(Unknown) User-defined name

msole:unknown-doc-20
META_NAME_MSOLE_UNKNOWN_21 =

(Unknown) User-defined name

msole:unknown-doc-21
META_NAME_MSOLE_UNKNOWN_22 =

(Boolean) User-defined name

msole:unknown-doc-22
META_NAME_MSOLE_UNKNOWN_23 =

(i4) User-defined name

msole:unknown-doc-23
META_NAME_NOTE_COUNT =

(Integer) Count of "notes" in the document.

gsf:note-count
META_NAME_OBJECT_COUNT =

(Integer) Count of objects (OLE and other graphics) in the document, if appropriate.

gsf:object-count
META_NAME_PAGE_COUNT =

(Integer) Count of pages in the document, if appropriate.

gsf:page-count
META_NAME_PARAGRAPH_COUNT =

(Integer) Count of paragraphs in the document, if appropriate.

gsf:paragraph-count
META_NAME_PRESENTATION_FORMAT =

(String) Type of presentation, like "On-screen Show", "SlideView" etc.

gsf:presentation-format
META_NAME_PRINTED_BY =

(String) Specifies the name of the last person who printed the document.

1.14.0 Moved from "gsf" to "meta".

meta:printed-by
META_NAME_PRINT_DATE =

(GsfTimestamp) Specifies the date and time when the document was last printed.

meta:print-date
META_NAME_REVISION_COUNT =

(Integer) Count of revision on the document, if appropriate. Moved from gsf:revision-count to meta:editing-cycles. This way can be used correctly by OpenDocument and Gnumeric.

meta:editing-cycles
META_NAME_SCALE =

(Boolean) ?????

gsf:scale
META_NAME_SECURITY =

(Integer) Level of security.

gsf:security
META_NAME_SLIDE_COUNT =

(Integer) Count of slides in the presentation document.

gsf:slide-count
META_NAME_SPREADSHEET_COUNT =

(Integer) Count of pages in the document, if appropriate.

gsf:spreadsheet-count
META_NAME_SUBJECT =

(String) The topic of the content of the resource, typically including keywords.

dc:subject
META_NAME_TABLE_COUNT =

(Integer) Count of tables in the document, if appropriate.

gsf:table-count
META_NAME_TEMPLATE =

(String) The template file that is been used to generate this document.

1.14.0 Moved from "gsf" to "meta"

meta:template
META_NAME_THUMBNAIL =

(GsfClipData) Thumbnail data of the document, typically a preview image of the document.

gsf:thumbnail
META_NAME_TITLE =

(String) A formal name given to the resource.

dc:title
META_NAME_WORD_COUNT =

(Integer) Count of words in the document.

gsf:word-count
LOG_DOMAIN =
"Gsf"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.const_missing(name) ⇒ Object



26
27
28
29
30
31
32
33
# File 'lib/gsf.rb', line 26

def const_missing(name)
  init
  if const_defined?(name)
    const_get(name)
  else
    super
  end
end

.initObject



35
36
37
38
39
40
41
42
43
# File 'lib/gsf.rb', line 35

def init
  class << self
    remove_method(:init)
    remove_method(:const_missing)
  end
  Gio.init if Gio.respond_to?(:init)
  loader = Loader.new(self)
  loader.load("Gsf")
end

Instance Method Details

#base64_decode_simple(data, len) ⇒ Integer

Decodes a chunk of base64 encoded data from data back into data.

Parameters:

  • data (Array<Integer>)

    data stream

  • len (Integer)

    max length of data to decode

Returns:

  • (Integer)

    the number of bytes converted

#base64_decode_step(in, len, out, state, save) ⇒ Integer

Decodes a chunk of base64 encoded data

Parameters:

  • in (Array<Integer>)

    input stream

  • len (Integer)

    max length of data to decode

  • out (Array<Integer>)

    output stream

  • state (Integer)

    holds the number of bits that are stored in save

  • save (Integer)

    leftover bits that have not yet been decoded

Returns:

  • (Integer)

    the number of bytes converted

#base64_encode_close(in, inlen, break_lines, out, state, save) ⇒ Integer

This funcion should be called to when finished encoding everything, to flush off the last little bit.

Parameters:

  • in (Array<Integer>)

    Data to be encoded

  • inlen (Integer)

    Length of data to be encoded

  • break_lines (Boolean)

    Whether to use line breaks

  • out (Array<Integer>)

    Encoded data.

  • state (Integer)

    holds the number of bits that are stored in save

  • save (Integer)

    leftover bits that have not yet been decoded

Returns:

  • (Integer)

    a count of the number of bytes in the final block.

#base64_encode_simple(data, len) ⇒ Integer

Encodes data from data back into data using base64 encoding.

Parameters:

  • data (Array<Integer>)

    data stream

  • len (Integer)

    max length of data to encode

Returns:

  • (Integer)

    the number of bytes encoded

#base64_encode_step(in, len, break_lines, out, state, save) ⇒ Integer

Performs an 'encode step', only encodes blocks of 3 characters from in into the output out at a time, saves left-over state in state and save (initialise to 0 on first invocation).

Parameters:

  • in (Array<Integer>)

    input stream

  • len (Integer)

    max length of data to decode

  • break_lines (Boolean)

    Whether to use line breaks

  • out (Array<Integer>)

    output stream

  • state (Integer)

    holds the number of bits that are stored in save

  • save (Integer)

    leftover bits that have not yet been decoded

Returns:

  • (Integer)

    the number of bytes encoded

#debug_flag(flag) ⇒ Boolean

Parameters:

  • flag (String)

Returns:

  • (Boolean)

#doc_meta_dump(meta) ⇒ nil

A debugging utility to dump the content of meta via g_print

Parameters:

Returns:

  • (nil)

#error_quarkGLib::Quark

Returns the #GQuark used to identify libgsf errors in #GError structures. Specific error codes come from the Gsf::Error enumeration.

Returns:

  • (GLib::Quark)

    the #GQuark used to identify libgsf errors in #GError structures. Specific error codes come from the Gsf::Error enumeration.

#extension_pointer(path) ⇒ String

Extracts the extension from the end of a filename (the part after the final '.' in the filename). filename, or a pointer to the end of the string if the filename does not have an extension.

Parameters:

  • path (String)

    A filename or file path.

Returns:

  • (String)

    A pointer to the extension part of the

#filename_to_utf8(filename, quoted) ⇒ String

A utility wrapper to make sure filenames are valid utf8. Caller must g_free the result.

Parameters:

  • filename (String)

    file name suitable for open(2).

  • quoted (Boolean)

    if true, the resulting utf8 file name will be quoted (unless it is invalid).

Returns:

  • (String)

    filename using utf-8 encoding for display

#iconv_close(handle) ⇒ nil

A utility wrapper to safely close an iconv handle.

Parameters:

  • handle (GLib::IConv)

    handle to be closed.

Returns:

  • (nil)

#initnil

Initializes the GSF library

Returns:

  • (nil)

#init_dynamic(module) ⇒ nil

Initializes the GSF library and associates it with a type module mod.

Parameters:

  • module (GObject::TypeModule)

    GType::Module.

Returns:

  • (nil)

#le_get_double(p) ⇒ Float

Interpret binary data as a double in little endian order.

Parameters:

  • p (GObject)

    pointer to storage

Returns:

  • (Float)

    interpreted data

#le_get_float(p) ⇒ Gsf::gfloat

Interpret binary data as a float in little endian order.

Parameters:

  • p (GObject)

    pointer to storage

Returns:

  • (Gsf::gfloat)

    interpreted data

#le_get_guint64(p) ⇒ Integer

Interpret binary data as a guint64 (8 byte unsigned integer type) in little endian order.

Parameters:

  • p (GObject)

    pointer to storage

Returns:

  • (Integer)

    interpreted data

#le_set_double(p, d) ⇒ nil

Store a value of type double in memory in little endian order

Parameters:

  • p (GObject)

    pointer to storage

  • d (Float)

    double to be stored

Returns:

  • (nil)

#le_set_float(p, f) ⇒ nil

Store a value of type float in memory in little endian order.

Parameters:

  • p (GObject)

    pointer to storage

  • f (Gsf::gfloat)

    float to be stored

Returns:

  • (nil)

#mem_dump(ptr, len) ⇒ nil

Dump len bytes from the memory location given by ptr.

Parameters:

  • ptr (Integer)

    memory area to be dumped.

  • len (Integer)

    how many bytes will be dumped.

Returns:

  • (nil)

#msole_codepage_to_lid(codepage) ⇒ Integer

Parameters:

  • codepage (Integer)

Returns:

  • (Integer)

#msole_iconv_open_codepage_for_export(codepage_to) ⇒ GLib::IConv

NOTE: skipped since GIConv is not exported to introspection.

Parameters:

  • codepage_to (Integer)

    the target code page.

Returns:

  • (GLib::IConv)

    an iconv converter to go from utf8 -> to our best guess at a useful windows codepage.

#msole_iconv_open_codepage_for_import(to, codepage) ⇒ GLib::IConv

NOTE: skipped since GIConv is not exported to introspection.

Parameters:

  • to (String)

    the target encoding.

  • codepage (Integer)

    the source code page.

Returns:

  • (GLib::IConv)

    an iconv converter for codepage -> utf8.

#msole_iconv_open_codepages_for_export(codepage_to, from) ⇒ GLib::IConv

NOTE: skipped since GIConv is not exported to introspection.

Parameters:

  • codepage_to (Integer)

    the target code page.

  • from (String)

    the source encoding.

Returns:

  • (GLib::IConv)

    an iconv converter to go from utf8 -> to our best guess at a useful windows codepage.

#msole_iconv_open_for_exportGLib::IConv

NOTE: skipped since GIConv is not exported to introspection.

Returns:

  • (GLib::IConv)

    an iconv convert to go from utf8 -> to our best guess at a useful windows codepage.

#msole_iconv_open_for_import(codepage) ⇒ GLib::IConv

NOTE: skipped since GIConv is not exported to introspection.

Parameters:

  • codepage (Integer)

    the source code page.

Returns:

  • (GLib::IConv)

    an iconv converter for single byte encodings codepage -> utf8. Attempt to handle the semantics of a specification for multibyte encodings since this is only supposed to be used for single bytes.

#msole_iconv_win_codepageInteger

Returns our best guess at the applicable windows code page based on an environment variable or the current locale.

Returns:

  • (Integer)

    our best guess at the applicable windows code page based on an environment variable or the current locale.

#msole_inflate(input, offset) ⇒ Array<Integer>

Decompresses an LZ compressed stream.

Parameters:

  • input (Gsf::Input)

    stream to read from

  • offset (Gsf::gsf_off_t)

    offset into it for start byte of compresse stream

Returns:

  • (Array<Integer>)

    A GByteArray that the caller is responsible for freeing

#msole_language_for_lid(lid) ⇒ String

xxx) for the given LID. If the LID is not found, is set to 0x0400, or is set to 0x0000, will return "-none-"

Parameters:

  • lid (Integer)

    numerical language id

Returns:

  • (String)

    the xx_YY style string (can be just xx or

#msole_lid_for_language(lang) ⇒ Integer

Returns the LID (Language Identifier) for the input language. If lang is nil, return 0x0400 ("-none-"), and not 0x0000 ("no proofing").

Parameters:

  • lang (String)

    Language id, i.e., locale name.

Returns:

  • (Integer)

    the LID (Language Identifier) for the input language. If lang is nil, return 0x0400 ("-none-"), and not 0x0000 ("no proofing")

#msole_lid_to_codepage(lid) ⇒ Integer

Returns our best guess at the codepage for the given language id.

Parameters:

  • lid (Integer)

    numerical language id

Returns:

  • (Integer)

    our best guess at the codepage for the given language id

#msole_lid_to_codepage_str(lid) ⇒ String

LID.

Parameters:

  • lid (Integer)

    numerical language id

Returns:

  • (String)

    the Iconv codepage string for the given

#odf_get_nsGsf::XMLInNS

Returns the used ODF namespace.

Returns:

  • (Gsf::XMLInNS)

    the used ODF namespace

#odf_get_versionGsf::gshort

Gives the ODF version used by libgsf when writing Open Document files.

Returns:

  • (Gsf::gshort)

    the ODF version: 102.

#odf_get_version_stringString

Gives the ODF version used by libgsf when writing Open Document files.

Returns:

  • (String)

    the ODF version as a string: "1.2".

#open_pkg_error_idInteger

Returns:

  • (Integer)

#open_pkg_foreach_rel(opkg, func, user_data) ⇒ nil

New in 1.14.9

Walks each relationship associated with opkg and calls func with user_data.

Parameters:

  • opkg (Gsf::Input)

    Gsf::Input

  • func (Gsf::OpenPkgIter)

    Gsf::OpenPkgIter

  • user_data (GObject)

    gpointer

Returns:

  • (nil)

#open_pkg_lookup_rel_by_id(opkg, id) ⇒ Gsf::OpenPkgRel

New in 1.14.6

Finds opkg's relation with id

NOTE: skipping because gsf_open_pkg_rel_get_type() does not return a GType.

Parameters:

  • opkg (Gsf::Input)

    Gsf::Input

  • id (String)

    identifier.

Returns:

  • (Gsf::OpenPkgRel)

    A Gsf::OpenPkgRel or nil

#open_pkg_lookup_rel_by_type(opkg, type) ⇒ Gsf::OpenPkgRel

New in 1.14.6

Finds a relation of opkg with type (no order is guaranteed)

NOTE: skipping because gsf_open_pkg_rel_get_type() does not return a GType.

Parameters:

  • opkg (Gsf::Input)

    Gsf::Input

  • type (String)

    target

Returns:

  • (Gsf::OpenPkgRel)

    A Gsf::OpenPkgRel or nil

#open_pkg_open_rel(opkg, rel) ⇒ Gsf::Input

Returns a new Gsf::Input which the called needs to unref, or nil and sets err.

Parameters:

  • opkg (Gsf::Input)

    Gsf::Input

  • rel (Gsf::OpenPkgRel)

    Gsf::OpenPkgRel

Returns:

  • (Gsf::Input)

    a new Gsf::Input which the called needs to unref, or nil and sets err

#open_pkg_open_rel_by_id(opkg, id) ⇒ Gsf::Input

New in 1.14.7

Open opkg's relation id

Parameters:

  • opkg (Gsf::Input)

    Gsf::Input

  • id (String)

    target id

Returns:

  • (Gsf::Input)

    A new GsfInput or nil, and sets err if possible.

#open_pkg_open_rel_by_type(opkg, type) ⇒ Gsf::Input

New in 1.14.9

Open one of opkg's relationships with type=type.

Parameters:

  • opkg (Gsf::Input)

    Gsf::Input

  • type (String)

    target type

Returns:

  • (Gsf::Input)

    A new GsfInput or nil, and sets err if possible.

#open_pkg_parse_rel_by_id(xin, id, dtd, ns) ⇒ GLib::Error

Convenience function to parse a related part.

Parameters:

  • xin (Gsf::XMLIn)

    Gsf::XMLIn

  • id (String)

    target id

  • dtd (Gsf::XMLInNode)

    Gsf::XMLInNode

  • ns (Gsf::XMLInNS)

    Gsf::XMLInNS

Returns:

  • (GLib::Error)

    nil on success or a #GError on failure.

#property_settings_collect(object_type, p_params, p_n_params, first_property_name, array) ⇒ nil

Parameters:

  • object_type (GLib::Type)
  • p_params (GObject::Parameter)
  • p_n_params (Integer)
  • first_property_name (String)
  • array (Array)

Returns:

  • (nil)

#property_settings_collect_valist(object_type, p_params, p_n_params, first_property_name, var_args) ⇒ nil

This function builds a GParameter array suitable for g_object_newv.

Parameters:

  • object_type (GLib::Type)

    the GType for which the properties are being set.

  • p_params (GObject::Parameter)

    a pointer to the GParameter array that holds the properties. (Used for both input and output. This may point to a nil pointer if there are no properties collected yet.)

  • p_n_params (Integer)

    a pointer to the number of properties collected. (Used for both input and output.)

  • first_property_name (String)

    the name of the first property being set, or nil.

  • var_args (Gsf::va_list)

    a va_list holding the remainder of the property names and values, terminated by a nil.

Returns:

  • (nil)

#property_settings_find(name, params, n_params) ⇒ GObject::Parameter

Parameters:

  • name (String)
  • params (Array<GObject::Parameter>)
  • n_params (Integer)

Returns:

  • (GObject::Parameter)

#property_settings_free(params, n_params) ⇒ nil

Parameters:

  • params (Array<GObject::Parameter>)
  • n_params (Integer)

Returns:

  • (nil)

#shutdownnil

De-intializes the GSF library Currently does nothing.

Returns:

  • (nil)

#shutdown_dynamic(module) ⇒ nil

De-intializes the GSF library from a type module. Currently does nothing.

Parameters:

  • module (GObject::TypeModule)

    currently unused

Returns:

  • (nil)

#value_get_docprop_array(value) ⇒ Array<GObject::Value>

This function returns the array of values inside Gsf::DocPropVector. No additional references are created. of #GValue

Parameters:

  • value (GObject::Value)

    A GValue of type Gsf::DocPropVector.

Returns:

  • (Array<GObject::Value>)

    A #GArray

#value_get_docprop_varray(value) ⇒ GObject::ValueArray

Parameters:

  • value (GObject::Value)

Returns:

  • (GObject::ValueArray)

#value_get_docprop_vector(value) ⇒ Gsf::DocPropVector

This function returns a pointer to the GsfDocPropVector structure in value. No additional references are created.

Parameters:

  • value (GObject::Value)

    A GValue of type Gsf::DocPropVector.

Returns:

#vba_inflate(input, offset, size, add_null_terminator) ⇒ Integer

Decompresses VBA stream.

Parameters:

  • input (Gsf::Input)

    stream to read from

  • offset (Gsf::gsf_off_t)

    offset into it for start byte of compressed stream

  • size (Integer)

    size of the returned array

  • add_null_terminator (Boolean)

    whenever add or not null at the end of array

Returns:

  • (Integer)

    A pointer to guint8 array

#xml_gvalue_from_str(res, t, str) ⇒ Boolean

Try to parse str as a value of type t into res. false otherwise.

Parameters:

  • res (GObject::Value)

    Result value

  • t (GLib::Type)

    Type of data

  • str (String)

    Value string

Returns:

  • (Boolean)

    True when parsing of str as a value of type t was succesfull;

#xml_parser_context(input) ⇒ Gsf::

Create a libxml2 pull style parser context wrapper around gsf input input. This signature will probably change to supply a SAX structure.

This adds a reference to input. A simple wrapper around a cleaner implementation that will fold in when we add other api changes. Its not worth bumping just for this.

NOTE: skipped since xmlParserCtxt is not exported to introspection.

Parameters:

Returns:

  • (Gsf::)

    A parser context

#xml_probe(input, func) ⇒ Boolean

Returns TRUE on success.

Parameters:

  • input (Gsf::Input)

    Gsf::Input

  • func (Gsf::XMLProbeFunc)

    Gsf::XMLProbeFunc

Returns:

  • (Boolean)

    TRUE on success.

#xmlDocFormatDump(output, cur, encoding, format) ⇒ Integer

Dumps the document cur into output.

Parameters:

  • output (Gsf::Output)

    Gsf::Output

  • cur (libxml2::Doc)

    #xmlDocPtr

  • encoding (String)

    The encoding to use.

  • format (Boolean)

    true to reformat the output.

Returns:

  • (Integer)

    status from xmlSaveFormatFileTo.