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 

OpenXml(XDom), How to read/write TDomCDATASection?

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





PostPosted: Fri Jan 19, 2007 9:13 am    Post subject: OpenXml(XDom), How to read/write TDomCDATASection? Reply with quote



Dear all,
Dose anybody tried to operate on the TDomCDATASection class intruduced
in the open source xml lib, XDOM? Could you give me a example? Many thinaks!

This lib is good, but really leak of document and examples!

My code showed below caused access violation and the program terminated
unexpectedly.

writing a cdata node:
-----------------------------------
var
notesTxtCopy: TDomCDATASection;
begin
notesTxtCopy := TDomCDATASection.Create(aNode.OwnerDocument);//aNode
is a object of type TDomElement that works fine.
notesTxtCopy.Data := 'some text';
aNode.AppendChild(notesNode);

-----------------------------------

reading a cdata node:
-----------------------------------
var
notesTxtCopy: TDomCDATASection;
someText: WideString;
begin
notesTxtCopy := TDomCDATASection(aNode.FirstChild);
if notesTxtCopy <> nil then
someText := notesTxtCopy.Data;

-----------------------------------


--------------------------------------------------------------------------------

Edwin
Best Regards,
Mind Visualizer--Productive Mind Mapping Software
http://www.mindmapware.com/
2006-11-20
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.