Oga v2.7 Release Notes
Release Date: 2016-09-27 // over 7 years ago-
Closing Elements When Generating XML
When generating XML Oga now properly closes elements with siblings but without ๐ children. See commit e0e0687dc29427c854c9fa6d3c19cee1c04f92c7 for more information.
๐ Newlines After Doctypes
When generating XML a newline would be inserted after a doctype. If another ๐ newline would follow in a text node this would lead to multiple newlines being ๐ present. Oga now ensures there is only 1 newline following a doctype. See commit e0e0687dc29427c854c9fa6d3c19cee1c04f92c7 for more information.
๐ Processing Instructions With Namespace Prefixes
๐ The XML lexer now supports processing instructions containing namespace prefixes ๐ such as
<?xml:foo ?>
. See commit 01fa1513f4bd6f194bf6d1ca17e510003fa23312 for more information.XML Declarations Are Now Processing Instructions
The class
Oga::XML::XmlDeclaration
now extendsOga::XML::ProcessingInstruction
. This allows documents to contain XML declarations in nested elements, instead of only allowing this at the root of ๐ the document. See commit 116b9b0ceb6feab4daa0bb417302590fba948bef for more information.Aliases For Getting & Setting Attributes
The methods
Oga::XML::Element#get
andOga::XML::Element#set
are now aliased ๐ as#[]
and#[]=
respectively. See d40baf0c724a3874f43100fbefa775cfb8dcacda for more information and thanks to Scott Wheeler for contributing the patch.