 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Richard Light Guest
|
Posted: Sat Jan 28, 2006 5:47 pm Post subject: Re: I cant parsing included external xml parts |
|
|
In message <43db2cce (AT) newsgroups (DOT) borland.com>, ilker <ilker (AT) ilker (DOT) com>
writes
| Quote: | does anyone can help me how do I parse included sections
// main.xml
?xml version="1.0" encoding="ISO-8859-1" ?
!DOCTYPE xml [
!ENTITY sample SYSTEM "samples.xml"
]
order
&sample;
/order
|
You need to set an option to resolve external entities. This means that
you have to load your file explicitly after doing so:
var x : txmlDocument;
begin
x := txmldocument.Create(nil);
x.ParseOptions := [poResolveExternals];
x.LoadFromFile('main.xml');
showmessage(x.ChildNodes['order'].childNodes['details'].nodeValue);
Richard Light
| Quote: |
// sample usage ( not properly running )
var x : txmlDocument;
begin
x := txmldocument.Create('main.xml');
x.ParseOptions := [poResolveExternals];
x.Active := true;
showmessage(x.ChildNodes['order'].childNodes['details'].nodeValue);
|
--
Richard Light
SGML/XML and Museum Information Consultancy
[email]richard (AT) light (DOT) demon.co.uk[/email]
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|