I want create an Attribute of type ID for an element.
Later a get this element with TDomDocument.GetElementById('String id'),
but for this i have to set the attribute to type ID.
How I do this???
procedure TForm1.Button1Click(Sender: TObject);
var
DomDocument : TDomDocument;
Element : TDomElement;
textNode : TDomText;
RootNode, TmpNode : TDomNode;
Attribute : TDomAttr;
begin
//Create Document
DomDocument := DomImplementation1.CreateDocument('Root', nil);
Element := DomDocument.createElement('Child');
Attribute := DomDocument.createAttribute('ID');
Element .setAttributeNode(Attribute);
Element .setAttribute('ID', '1');
{How set this attribute to Type ID, to later use
DomDocument.GetElementById('1') }
textNode := DomDocument.createTextNode('nuno');
Element .appendChild(TextNode);
DomDocument.documentElement.appendChild(NAluno);
(...)
end;