Hola a tod@s,
(working with BDS 2006 Upg1, XPProf SP2, P4 1GBRAM.)
Tengo problemas con un documento XML que estoy contruyendo.
Hasta ahora nunca habia tenido problemas, pero ahora me esta apareciendo algo un poco raro.
Al ponerle el atributo mslns en el nodo principal del documento, a la que añado más nodos a ese nodo, automaticamente a los nuevos nodos le inserta ese artibuto, aunque en blanco.
Código:
----------------------------------------------------------
Código Delphi
[-]
xmlDoc := TXMLDocument.Create(tblConfig.Owner);
try
xmlDoc.Version = '1.0';
xmlDoc.Active := TRUE;
xmlElement := xmlDoc.CreateNode('FunctionCallRequest ');
xmlElement.SetAttribute('xmlns:xsd','String1');
xmlElement.SetAttribute('xmlns:xsi','String2');
xmlElement.SetAttribute('xmlns','String3');
xmlDoc.DocumentElement := xmlElement;
xmlNode := xmlElement.AddChild('TimeStamp');
...
----------------------------------------------------
The result:
-----------------------------------------------------
<FunctionCallRequest xmlns:xsd="String1" xmlns:xsi="String2" xmlns="String3">
<Timestamp xmlns="">
....
---------------------------------------------------
<Timestamp xmlns=""> es el problema, ya que debería ser <TimeStamp>
¿Alguien sabe a que puede ser debido esto?
Muchas gracias.