Xml.Win.msxmldom.LoadFromXMLString

From RAD Studio API Documentation
Jump to: navigation, search


Delphi

function LoadFromXMLString(const Doc: IXMLDOMDocument; const XML: string): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall LoadFromXMLString(const _di_IXMLDOMDocument Doc, const System::UnicodeString XML);

Properties

Type Visibility Source Unit Parent
function public
Xml.Win.msxmldom.pas
Xml.Win.msxmldom.hpp
Xml.Win.msxmldom Xml.Win.msxmldom

Description

Loads a DOM document from an XML-formatted string. To load an XML-formatted string into a TMSDOMDocument, you can use the following code:

// Doc is a TMSDOMDocument
Doc := TMSDOMDocument.Create(CreateDOMDocument);
LoadFromXMLString(Doc.MSDocument, '<t>v</t>');

Another option is the following code:

// Doc is a TMSDOMDocument
Doc := TMSDOMDocument.Create(CreateDOMDocument);
Doc.MSDocument.loadXML('<r>s</r>');

See Also