. , Delphi (MSXML) , - .
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module [
<!ENTITY Schema65 SYSTEM "schemas/65.xml">
]>
<module>
<schema>&Schema65;</schema>
</module>
, TXMLDocument , :
MyXML := TXMLDOcument.Create(myfile.xml);
ExternalText := MyXML.documentElement.ChildNodes['schema'].Text;
, . Delphi "ntEntityRef" "" node. node , , , , . :
MyXML.documentElement.ChildNodes['schema'].FirstChild.FirstChild.Text;
If the external object file contains a node structure, the corresponding nodes will be created inside the reference to the node object. Make sure TXMLDocument.ParseOptions is set to at least [poResolveExternals]. This approach also simplifies the adaptation of the code generated by the XML Data Binding Wizard to work with external objects.
source
share