Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3/4TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

PowerBuilder Examples

Web API Categories

ASN.1
Amazon Glacier
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Async
Azure Cloud Storage
Azure Service Bus
Base64
Bounced Email
Box
CAdES
CSR
CSV
Certificates
Compression
DKIM / DomainKey
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
ECC
Email Object
Encryption
FTP
FileAccess
Firebase
GMail REST API
Geolocation
Google APIs
Google Calendar
Google Cloud Storage
Google Drive
Google Photos
Google Sheets
Google Tasks
Gzip
HTML-to-XML/Text

HTTP
HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)
Java KeyStore (JKS)
MHT / HTML Email
MIME
Microsoft Graph
NTLM
OAuth1
OAuth2
OneDrive
OpenSSL
Outlook
PEM
PFX/P12
POP3
PRNG
REST
REST Misc
RSA
SCP
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
SharePoint
Socket/SSL/TLS
Spider
Stream
Tar Archive
Upload
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Zip
curl

 

 

 

(PowerBuilder) Xml TagPath Property Explained

Demonstrates and explains the TagPath property.

Note: The TagPath property was introduced in Chilkat v9.5.0.77

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

integer li_rc
oleobject loo_Xml
integer li_Success
integer li_Found
string ls_TagPath

loo_Xml = create oleobject
li_rc = loo_Xml.ConnectToNewObject("Chilkat_9_5_0.Xml")
if li_rc < 0 then
    destroy loo_Xml
    MessageBox("Error","Connecting to COM object failed")
    return
end if

// Load some XML:
li_Success = loo_Xml.LoadXml("<a><bbb><ccc><ddd>1</ddd><ddd><z>zzz</z></ddd><ddd>3</ddd></ccc></bbb></a>")

Write-Debug loo_Xml.GetXml()

// This is what we have:

// <?xml version="1.0" encoding="utf-8"?>
// <a>
//     <bbb>
//         <ccc>
//             <ddd>1</ddd>
//             <ddd>
//                 <z>zzz</z>
//             </ddd>
//             <ddd>3</ddd>
//         </ccc>
//     </bbb>
// </a>

// The TagPath property is read-only property that returns the unique path to the
// node from the document root.

// For example:
li_Found = loo_Xml.SearchForTag2(loo_Xml,"z")
if li_Found = 1 then
    // We found a node having the tag "z".
    // The TagPath property tells us the location in the document.
    ls_TagPath = loo_Xml.TagPath
    Write-Debug ls_TagPath

    // The tagPath is bbb|ccc|ddd[1]|z

    // If we to back to the document root, we can get to the given node via the tagPath.
    loo_Xml.GetRoot2()
    Write-Debug loo_Xml.Tag
    // The root tag is "a".

    // Follow the tagPath to the "z" node:
    li_Found = loo_Xml.FindChild2(ls_TagPath)
    Write-Debug "found = " + string(li_Found) + ", tag = " + loo_Xml.Tag
    // We are now at "z".

end if



destroy loo_Xml

 

© 2000-2019 Chilkat Software, Inc. All Rights Reserved.