BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: I cant parsing included external xml parts

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi XML
View previous topic :: View next topic  
Author Message
Richard Light
Guest





PostPosted: Sat Jan 28, 2006 5:47 pm    Post subject: Re: I cant parsing included external xml parts Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi XML All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.