Class Openwsman::XmlDoc
In: ../openwsman.i
openwsman/xmldoc.rb
Parent: Object

Document-class: XmlDoc

XmlDoc holds an XML document and thus represents the root of an XML tree. XmlDoc is optimized for SOAP type documents, giving accessors to the SOAP envelope, header and body.

Instances of the other XML related classes like XmlAttr and XmlNode can only be created with an associated XmlDoc instance.

Main properties of the XML document are

  • name of the root element
  • encoding (defaults to _UTF-8_)

Methods

External Aliases

string -> to_xml

Public Class methods

new(p1, p2)

Create XmlDoc with node name optionally pass namespace as 2nd arg (defaults to NULL)

Public Instance methods

get enumeration context as string return nil if context not present or empty

Generate response envelope document, optionally relating to a specific action.

This creates a new XmlDoc instance representing a response.

dump document to file

get soap element node by name returns nil if no element with the name can be found

encode document as string with specific encoding (non-indented representation)

encoding defaults to ‘utf-8‘

alias: to_s

Check if document represents an end of sequence (last enumeration item)

Generate fault document based on given status

This creates a new XmlDoc instance representing a fault

Check if document represents a fault

generic (indented) string representation of the XmlDoc UTF-8 encoded. see encode for setting the encoding.

alias: to_xml

to_s(p1)

Alias for encode

[Validate]