Jump to content
Sign in to follow this  
Aipion

XML parser "ChilkatXml"

Recommended Posts

Aipion

This is an example of how you can use the Xml ActiveX component provided by Chilkat for Free even commercial use.

Works on: Microsoft Windows 7, Vista, XP, 2000, 2003 Server, 2008 Server, and Windows 95/98/NT4. (32 bit / 64 bit)

License:.

LICENSE AGREEMENT

Chilkat Software Inc ("Chilkat") is willing to license the Chilkat XML component and its associated online documentation ("Software") to you only upon the condition that you agree to and accept all of the terms and conditions contained in this LICENSE AGREEMENT ("Agreement"). Please read the terms carefully before downloading and installing the Software.

BY INSTALLING THE SOFTWARE, YOU CONSENT TO BE BOUND BY AND BECOME A PARTY TO THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT, DO NOT INSTALL THE SOFTWARE

TERMS OF USE:

Software is free. You are allowed to distribute Software by any means of electronic transfer or physical media. Software must be provided free of any charge to the recipient, and may not be modified in any way. All the files included in the original installation must remain intact and unmodified. Software can be used by commercial users. Software files can be freely distributed with another application which adds substantial functionality. It is illegal to repackage the software as your own application and sell it.

RESTRICTIONS:

The license granted hereunder does not permit you to:

a. Modify, translate, reverse engineer, de-compile, disassemble, or create derivative works based on the Software;

b. Sell, rent, lease, grant a security interest in, or otherwise attempt to sell rights to the Software; or

c. Remove or alter any proprietary notices or labels on the Software, documentation or distribution media.

PROHIBITED USES:

The Software is not designed, manufactured or intended for use or resale as on-line control equipment in hazardous environments requiring fail-safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons systems, in which the failure of the Software could lead directly to death, personal injury, or severe physical or environmental damage. Accordingly, Chilkat and its licensors prohibit use of the Software in connection with such activities, and specifically disclaim any express or implied warranty of fitness for such activities.

DISCLAIMER OF WARRANTY AND LIABILITY:

USER EXPRESSLY AGREES THAT USE OF THE SOFTWARE AND THE SITE IS AT THE USER'S SOLE RISK. THE SOFTWARE AND THE SITE ARE PROVIDED ON AN "AS IS" BASIS WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, RESULTS, OR OTHERWISE. NEITHER CHILKAT NOR ANY OTHER PARTY INVOLVED IN CREATING, PRODUCING, OR DELIVERING THE SOFTWARE OR THE SITE SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF USE OF THE SOFTWARE OR THE SITE OR INABILITY TO USE THE SOFTWARE OR THE SITE OR OUT OF ANY BREACH OF ANY WARRANTY OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION BASED UPON CONTRACT, NEGLIGENCE OR OTHER TORTIOUS CONDUCT, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE SOFTWARE OR THE SITE. NOTWITHSTANDING THE FOREGOING, THE TOTAL AMOUNT OF CHILKAT’S LIABILITY TO USER SHALL BE LIMITED TO THE AMOUNT USER PAID FOR THE USE OF THE SOFTWARE AND THE SITE, IF ANY.

COPYRIGHT:

Chilkat retains all intellectual rights to the data contained in installation files. All rights not expressly granted are reserved by Chilkat. The Chilkat products is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties.

All brands and product names mentioned in this document and in the Software are trademarks of their respective owners.

If you want to see the Documentation, that can be found Here.

Some Examples in Vbscript (That is the closest to AutoIt) can be found Here.

Chilkats Description:

High-level non-validating XML parser component that is free for both commercial and non-commercial use.

  • Load/save XML files to an in-memory document object model (DOM).
  • Add name/value attribtes to nodes.
  • Compress nodes or entire sub-trees using in-memory Zip compression.
  • AES encrypt the content of a node.
  • Numerous methods for iterating over the nodes in a document.
  • Numerous methods for searching and sorting nodes in a document.
  • API designed to make it easy to do frequently encountered tasks when working with XML.
  • Makes it easy to handle binary data (such as image data) within XML files.
Download contains: 32 bit & 64 bit file compressed with MPRESS, example AutoIt script and related files.

Download Now

Edited by Aipion

Share this post


Link to post
Share on other sites
WhiteStar

I just looked at the Chilkat site. This is not a free product by any means. Once you have a licence, you can make re-distributable apps (no source from chilkat) which include the material but that's the limit of it pretty well.

WS


~ WhiteStar Magic

Always tuned to http://www.superbluesradio.com/  Tune in at http://87.117.217.41:8036/

Share this post


Link to post
Share on other sites
ProgAndy

I just looked at the Chilkat site. This is not a free product by any means. Once you have a licence, you can make re-distributable apps (no source from chilkat) which include the material but that's the limit of it pretty well.

WS

The XML component is free. At least the download is marked with (Freeware), the description says "free for both commercial and non-commercial use.", the interface contains no "UnlockComponent"-Method, and the description page contains no purchase-link.

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites
WhiteStar

Maybe I was looking at the wrong one. http://www.chilkatsoft.com/licensingExplained.asp & http://www.chilkatsoft.com/xml-activex.asp is what I was looking at. I see that they have different ones and the one referred to in this post is the freeware one.

So my bad, Sorry.

WS

I only picked up on the XML parsing because I'm working on a prog that needs to read/write xml data and thought this may be a better / easier solution... now to just figure out how to get AutoIt to generate UUID's.


~ WhiteStar Magic

Always tuned to http://www.superbluesradio.com/  Tune in at http://87.117.217.41:8036/

Share this post


Link to post
Share on other sites
AdamUL

For a UUID Generator, look at this It would need to be converted to a function.

Adam

Share this post


Link to post
Share on other sites
ptrex

Share this post


Link to post
Share on other sites
WhiteStar

Ohhh no.... I didn't intend this to get hijacked with the UUID thing.

Please, this should be last post for the UUID, there was a previous thread that I missed but replied into it now..

Last night when I was searching in here the forums went offline for maintenance & so did not find anything... now things pop up everywhere. :oops:

Thanks a lot PTrex & AdamUL, simply superb!

WhiteStar


~ WhiteStar Magic

Always tuned to http://www.superbluesradio.com/  Tune in at http://87.117.217.41:8036/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • macran
      By macran
      I want to generating a XML file (test.xml) like as follow:
      <?xml version="1.0" encoding="GBK"?>
      <!DOCTYPE SCHEMA SYSTEM "HGWSPZJK.dtd">  ;I can not generate this line
      <SCHEMA CRC="HGWSPZ201808_9131011571786229XM_CRC.XML" SSSQ="201808" CHSNAME="HGWSDKQD" NAME="HGWSPZ">

      <TAXPAYER CJRMC="sigmagroup" CJRDM="9131011571786229XM" CJLX="DKZK" RECORDCOUNT="411" SBRQ="2018-08-31" NSRMC="sigmagroup" SWSBH="9131011571786229XM">

      <Records>
      <Record BZ="" JKKADM="2244" JKKAMC="shanghai" SE="5907.82" TFRQ="2018-08-23" FPHM="224420181000752586-L02"/>
      <Record BZ="" JKKADM="2244" JKKAMC="shanghai" SE="4742.4" TFRQ="2018-08-21" FPHM="224420181000743016-L01"/>
      <Record BZ="" JKKADM="2244" JKKAMC="shanghai" SE="18720" TFRQ="2018-08-14" FPHM="224420181000719215-L01"/>
      </Records>
      </TAXPAYER>
      </SCHEMA>
      I use XML.UDF  
      Local $oXMLile=_XML_CreateFile(@ScriptDir&"\test.xml","",True) 
      but there is no function CreateDocumentType 
      It is no effort even I test use 
      Local $doct=$oXMLfile.CreateDocumentType("SCHEMA", null, "HGWSPZJK.dtd", null)
            $oXmlfile.appendChild($doct)
      pls help me thanks.
       
       
       
       
       
       
    • Skeletor
      By Skeletor
      Hi All,
      This is purely an XML Language question. I need to understand how I can add a value/element in between another XML element. 
      Code below shows the XML file. The info tag has the elements already inserted.
      <Configuration xmlns="http://schemas.datacontract.org/2004/07/Modules.Reporting.DataContracts.LineItems" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <GenConf> <Info>ID, Site, Name , Site_ID</Info> </GenConf> </Configuration> Now, I want to add a value from a node group into this code. Something like below. But the example below does not work.
      Any suggestions?
       
      <Configuration xmlns="http://schemas.datacontract.org/2004/07/Modules.Reporting.DataContracts.LineItems" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <GenConf> <Info>ID, Site, a/@id, Name , Site_ID</Info> </GenConf> </Configuration> <ProductName> <a id="Windows Server"/> </ProductName>  
    • bhns
      By bhns
      try it for make flyers old games xml + Gdi, i belive many sources had lost 
      AIT-ADRLIST.au3

    • CosminV
      By CosminV
      Hello guys,
       
      This XML things are driving me crazy...
      Please let me know how can I use the _XMLGetAttrib function... I've tried every possible way that I've read on the forum and I cannot succeed reading an attribute.
       
      The XML looks like bellow:
       
      <?xml version="1.0" encoding="UTF-8"?>
      <BATCH attr1= "aaa" attr2="bbb" attr3="ccc">
           <Node1 attr1="aaa" attr2="bbb" attr3="ccc" attr4="ddd" attr5="" attr6="eee" attr7="fff" attr8="ggg"/>
           <Node2 attr1="aaa" attr2="" attr3="" attr4="ddd"/>
           <Node3 attr1="" attr2="" attr3="ccc" attr4="" attr5="" attr6="eee"/>
           <Panel attr1="aaa" STATUS="BBB" attr3="ccc" attr4="ddd" attr5="" attr6="eee">
                <Node5 attr1="aaa" attr2="bbb" attr3="ccc" attr4="ddd" attr5="" attr6="eee" attr7="fff" attr8="ggg"/>
                .............................................................................................................................................................................
           </Panel>
      </Batch>
       
      I need to read the value of STATUS form the Panel node.
       
      Could you please help me?
       
      Best regards,
      Cococnb
    • Subz
      By Subz
      Can anyone assist with creating/modify/delete XML Nodes/Child Nodes?
      Have a document for example:
      <ConfigData> <parameter> <name>Setting One</name> <value>10</value> </parameter> <parameter> <name>IPAddress</name> <value>192.168.1.1</value> </parameter> <parameter> <name>Setting One</name> <value>200</value> </parameter> <parameter> <name>Setting Three</name> <value>300</value> </parameter> </ConfigData> Would like to add another node parameter/name, parameter/value, but unsure how to, when there are multiple instances with the same tagname for example, would like to add the following if the nodes do not already exist:
      <parameter> <name>UserPreferredLanguage</name> <value>English</value> </parameter> Currently using the following to check and delete/modify existing nodes, was thinking of placing the name and value into a 2d array and then using a true/false in a 3rd column to return if the setting was found and modified or not, so I can decide whether I need to create the nodes or not, but I'm hoping there is a simpler way.\
      Any assistance would be much appreciated.
      PS: Have also written this with the XML Dom Wrapper UDF but still unsure how to proceed with checking nodes and creating them if they're missing, also couldn't find a function to delete a full node + parent using selectNodes, hence the custom __XML_DeleteNode function.
      Thanks
      Local $sXMLDocPath = @ScriptDir & "\XMLDoc.xml" Local $oXMLDoc = ObjCreate("MSXML2.DOMDocument") $oXMLDoc.validateOnParse = False $oXMLDoc.load($sXMLDocPath) Local $oXMLNodes = $oXMLDoc.selectNodes("ConfigData/parameter") If IsObj($oXMLNodes) Then For $oXMLNode In $oXMLNodes If $oXMLNode.childNodes.item(0).tagName = "Name" And $oXMLNode.childNodes.item(0).Text = "Setting One" Then If $oXMLNode.childNodes.item(1).tagName = "Value" Then $oXMLNode.childNodes.item(1).Text = 10 EndIf If $oXMLNode.childNodes.item(0).tagName = "Name" And $oXMLNode.childNodes.item(0).Text = "IPAddress" Then __XML_DeleteNode($oXMLNode) EndIf If $oXMLNode.childNodes.item(0).tagName = "Name" And $oXMLNode.childNodes.item(0).Text = "Setting Two" Then If $oXMLNode.childNodes.item(1).tagName = "Value" Then $oXMLNode.childNodes.item(1).Text = 20 EndIf If $oXMLNode.childNodes.item(0).tagName = "Name" And $oXMLNode.childNodes.item(0).Text = "Setting Three" Then If $oXMLNode.childNodes.item(1).tagName = "Value" Then $oXMLNode.childNodes.item(1).Text = 30 EndIf Next EndIf $oXMLDoc.Save ($sXMLDocPath) Func __XML_DeleteNode($_oNode_Enum) If $_oNode_Enum.hasChildNodes Then For $_oNode_Enum_Child In $_oNode_Enum.childNodes If $_oNode_Enum_Child.nodeType = $XML_NODE_TEXT Then If StringStripWS($_oNode_Enum_Child.text, $STR_STRIPLEADING + $STR_STRIPTRAILING + $STR_STRIPSPACES) = "" Then $_oNode_Enum.removeChild($_oNode_Enum_Child) EndIf EndIf Next EndIf $_oNode_Enum.parentNode.removeChild($_oNode_Enum) EndFunc  
×