The experience of dynamically invoking Txmldocument in Delphi

Source: Internet
Author: User

var
Vxmldocument:txmldocument;
Begin
Vxmldocument: = Txmldocument.create (' C:/temp/temp.xml ');
Caption: = IntToStr (VXMLDocument.Node.ChildNodes.Count);
Vxmldocument.free;
End;Execute the above code to jump out of "Invalid pointer operation" exceptionfound shielding vxmldocument.free; it's normal again.Trace Kernel code vxmldocument was released two times it's not clear why there's no way to search the code everywhere.then place a txmldocument control directly on the formThis piece of code doesn't go wrong.Depressed, the only difference is the placement of the control assigned to the owner, Direct txmldocument.create (' c:/temp/temp.xml '); no assignment owner okay, first of all, fix it.Var
Vxmldocument:txmldocument;
Begin
Vxmldocument: = Txmldocument.create (self);
Vxmldocument.filename: = ' c:/temp/temp.xml ';
Vxmldocument.active: = True;
Caption: = IntToStr (VXMLDocument.Node.ChildNodes.Count);
Vxmldocument.free;
End
That's what it looks like, but it's all based on experience.how to deal with the VCL kernel still needs to be analyzedhttp://blog.csdn.net/zswang/article/details/1610404

The experience of dynamically invoking Txmldocument in Delphi

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.