Xml - Custom TDomElement descendents
Original Reporter info from Mantis: dgaspary @dgaspary
-
Reporter name: Daniel Gaspary
Original Reporter info from Mantis: dgaspary @dgaspary
- Reporter name: Daniel Gaspary
Description:
0024860: Xml TDomElement descendants creation
With the attached (DOM) patch is possible to instantiate TDomElement Nodes with custom classes.
Same change as issue #24860 (closed), but to CreateElement method, instead of CreateElementNS.
Steps to reproduce:
program dom_test;
uses dom;
type
TMyElement = class(TDOMElement);
var
doc: TXMLDocument;
e: TDOMElement;
begin
doc:=TXMLDocument.Create;
doc.AppendChild(doc.CreateElement('main'));
e:=doc.CreateElement('ChildElement', TMyElement);
WriteLn(e.ClassName);
end.
Mantis conversion info:
- Mantis ID: 25114
- OS: Linux
- OS Build: Ubuntu 12.10
- Platform: x86-64
- Version: 2.7.1