Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 4 - Delphi and the DOM
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DELPHI-KYLIX

Delphi and the DOM
By: David Web
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 3
    2008-11-10

    Table of Contents:
  • Delphi and the DOM
  • Coding with the DOM in Delphi
  • XMLDOM.pas Unit continued
  • Even More XMLDOM.pas Unit

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Delphi and the DOM - Even More XMLDOM.pas Unit


    (Page 4 of 4 )


    { IDOMNodeList }


    IDOMNodeList = interface

    ['{2BF4C0E2-096E-11D4-83DA-00C04F60B2DD}']

    { Property Acessors }

    function get_item(index: Integer): IDOMNode; safecall;

    function get_length: Integer; safecall;

    { Properties }

    property item[index: Integer]: IDOMNode read get_item; default;

    property length: Integer read get_length;

    end;


    { IDOMNamedNodeMap }


    IDOMNamedNodeMap = interface

    ['{2BF4C0E3-096E-11D4-83DA-00C04F60B2DD}']

    { Property Acessors }

    function get_item(index: Integer): IDOMNode; safecall;

    function get_length: Integer; safecall;

    { Methods }

    function getNamedItem(const name: DOMString): IDOMNode; safecall;

    function setNamedItem(const arg: IDOMNode): IDOMNode; safecall;

    function removeNamedItem(const name: DOMString): IDOMNode; safecall;

    function getNamedItemNS(const namespaceURI, localName: DOMString): IDOMNode; safecall; { DOM Level 2 }

    function setNamedItemNS(const arg: IDOMNode): IDOMNode; safecall; { DOM Level 2 }

    function removeNamedItemNS(const namespaceURI, localName: DOMString): IDOMNode; safecall; { DOM Level 2 }

    { Properties }

    property item[index: Integer]: IDOMNode read get_item; default;

    property length: Integer read get_length;

    end;


    { IDOMCharacterData }


    IDOMCharacterData = interface(IDOMNode)

    ['{2BF4C0E4-096E-11D4-83DA-00C04F60B2DD}']

    { Property Acessors }

    function get_data: DOMString; safecall;

    procedure set_data(const data: DOMString); safecall;

    function get_length: Integer; safecall;

    { Methods }

    function substringData(offset, count: Integer): DOMString; safecall;

    procedure appendData(const data: DOMString); safecall;

    procedure insertData(offset: Integer; const data: DOMString); safecall;

    procedure deleteData(offset, count: Integer); safecall;

    procedure replaceData(offset, count: Integer; const data: DOMString); safecall;

    { Properties }

    property data: DOMString read get_data write set_data;

    property length: Integer read get_length;

    end;


    { IDOMAttr }


    IDOMAttr = interface(IDOMNode)

    ['{2BF4C0E5-096E-11D4-83DA-00C04F60B2DD}']

    { Property Acessors }

    function get_name: DOMString; safecall;

    function get_specified: WordBool; safecall;

    function get_value: DOMString; safecall;

    procedure set_value(const attributeValue: DOMString); safecall;

    function get_ownerElement: IDOMElement; safecall;

    { Properties }

    property name: DOMString read get_name;

    property specified: WordBool read get_specified;

    property value: DOMString read get_value write set_value;

    property ownerElement: IDOMElement read get_ownerElement; { DOM Level 2 }

    end;


    { IDOMElement }


    IDOMElement = interface(IDOMNode)

    ['{2BF4C0E6-096E-11D4-83DA-00C04F60B2DD}']

    { Property Acessors }

    function get_tagName: DOMString; safecall;

    { Methods }

    function getAttribute(const name: DOMString): DOMString; safecall;

    procedure setAttribute(const name, value: DOMString); safecall;

    procedure removeAttribute(const name: DOMString); safecall;

    function getAttributeNode(const name: DOMString): IDOMAttr; safecall;

    function setAttributeNode(const newAttr: IDOMAttr): IDOMAttr; safecall;

    function removeAttributeNode(const oldAttr: IDOMAttr): IDOMAttr; safecall;

    function getElementsByTagName(const name: DOMString): IDOMNodeList; safecall;

    function getAttributeNS(const namespaceURI, localName: DOMString): DOMString; safecall; { DOM Level 2 }

    procedure setAttributeNS(const namespaceURI, qualifiedName, value: DOMString); safecall; { DOM Level 2 }

    procedure removeAttributeNS(const namespaceURI, localName: DOMString); safecall; { DOM Level 2 }

    function getAttributeNodeNS(const namespaceURI, localName: DOMString): IDOMAttr; safecall; { DOM Level 2 }

    function setAttributeNodeNS(const newAttr: IDOMAttr): IDOMAttr; safecall; { DOM Level 2 }

    function getElementsByTagNameNS(const namespaceURI,

    localName: DOMString): IDOMNodeList; safecall; { DOM Level 2 }

    function hasAttribute(const name: DOMString): WordBool; safecall; { DOM Level 2 }

    function hasAttributeNS(const namespaceURI, localName: DOMString): WordBool; safecall; { DOM Level 2 }

    { Properties }

    property tagName: DOMString read get_tagName;

    end;


    { IDOMText }


    IDOMText = interface(IDOMCharacterData)

    ['{2BF4C0E7-096E-11D4-83DA-00C04F60B2DD}']

    function splitText(offset: Integer): IDOMText; safecall;

    end;


    { IDOMComment }


    IDOMComment = interface(IDOMCharacterData)

    ['{2BF4C0E8-096E-11D4-83DA-00C04F60B2DD}']

    end;


    { IDOMCDATASection }


    IDOMCDATASection = interface(IDOMText)

    ['{2BF4C0E9-096E-11D4-83DA-00C04F60B2DD}']

    end;



    In the next article we will look at a partial listing of the xmlintf unit and then write a program to demonstrate how to use DOM in Delphi.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

    DELPHI-KYLIX ARTICLES

    - Loading an XML Document into the DOM
    - Delphi Wrapper Classes and XML
    - Delphi and the DOM
    - Delphi and XML
    - Internet Access: Client Service
    - Finishing the Client for an Internet Access ...
    - The Client for an Internet Access Control Ap...
    - User Management for an Internet Access Contr...
    - Important Procedures for an Internet Access ...
    - Server Code for an Internet Access Control A...
    - Constructing the Interface for an Internet A...
    - Building a Server Application for an Interne...
    - Building an Internet Access Control Applicat...
    - Client Dataset: Working with Data Packets an...
    - Using the Client Dataset in an N-Tiered Appl...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek