How to Read XML File - Data Source

Discussion in 'Free Source Codes' started by teja varma, Feb 14, 2020.

    
  1. teja varma

    teja varma Active Member


    Cheers...

    -> Want to Show You How We Can Read XML File in TDL
    -> Thought it will be useful for you
    -> XML (eXtensible Markup Language) - Used to Exchange Data between Nodes and to Store Data


    -> Download Cd.rar file(Attached Below)
    -> Unzip it and Place Cd.xml file in Tally Folder(Tally Working Directory)
    -> Download and Load ReadXml.txt file in Tally(Attached Below)
    -> Then Click Cd Info Option in Gateway Of Tally(it will display data from XML file)

    Alternate Download:
    https://github.com/tejavarma-aln/Read-Xml-with-TDL

    Didn't get it? Click Here to watch the Video.


    Coming Soon - How to Fetch XML Response From WebServer
     

    Attached Files:

    saravanan1999 and Frz like this.




  2. rmraja

    rmraja Active Member


    Thanks
     


  3. teja varma

    teja varma Active Member


    Here is the Second part of XML Integration with Tally:

    Click to watch
     
    saravanan1999 likes this.


  4. ROHIT JAISWAR

    ROHIT JAISWAR Active Member


    Code:
    [Collection:HttpXMLColl]
       
        Data Source        :HTTP XML:"http://login.bulksmsinmumbai.com/api/mt/GetBalance?User=demo&Password=demo123"
        XML Object Path    :BalanceResponse:1
       
    [Collection:BalanceColl]
       
        Source Collection    :    HttpXMLColl
        Compute                :    Balance        :    $Balance
        Fetch                :    Balance
    
    
    [#Menu:GateWayOfTally]
        
         Add    :    Item    :    SMS Balance    :    Display    :    SMSBalance
        
    [Report:SMSBalance]
       
        Form    :    SMSBalanceReport
        Title    :    "SMS Balance"
       
    [Form:SMSBalanceReport]
       
        Part    :    SMSBalancePart
       
    [Part:SMSBalancePart]
       
        Line    :    SMSBalanceHeaders,SMSBalanceData
        Repeat    :    SMSBalanceData:BalanceColl
        Width    :    20% page
        Height    :    12% page
        Border    :    thin box
       
    [Line:SMSBalanceHeaders]
       
        Border        :    ThickTopBottom
        Space Top    :    0.5
        Space Bottom:    0.5
        Field        :    SMSBalance
        Local        :    Field    :    SMSBalance        :    Set as    :    "SMS Balance"
        Local        :    Field    :    SMSBalance        :    Align    :    Center
    
    [Line:SMSBalanceData]
       
        Field        :    SMSBalance
        Space Top    :    0.5
        Space Bottom:    0.5
       
    [Field:SMSBalance]
       
        Set as    :    $Balance
        Width    :    20% Page
        Align    :    Center


    Thank you Teja Sir for XML Integration Code
    with the help of your code i have sent the message to particular Mobile Number
    but unable to fetch Balance Please Help

    Syntax of Output XML is Like given below

    Code:
    <BalanceResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <ErrorCode>0</ErrorCode>
    <ErrorMessage>Done</ErrorMessage>
    <Balance>Promo:0|Trans:104</Balance>
    </BalanceResponse>
     


  5. teja varma

    teja varma Active Member


    No need to define BalanceColl
    You can access balance value like this:
    Code:
    $$CollectionField:$Balance:1:HttpXMLColl
     
    ROHIT JAISWAR likes this.


  6. ROHIT JAISWAR

    ROHIT JAISWAR Active Member


    Thank you so much Teja Sir for Quick Response
    I have tried the Code given by you but its not working
    Please Suggest other idea
     


  7. teja varma

    teja varma Active Member


    change
    Code:
    XML Object Path :BalanceResponse:1
    to
    Code:
    XML Object:"BalanceResponse:1"
    and use

    Code:
    $$CollectionField:$Balance:1:HttpXMLColl[/CODE
     


  8. ROHIT JAISWAR

    ROHIT JAISWAR Active Member


    Thank you so much Sir for your valuable Response
    I have tried the code given by you but value not coming yet

    Code:
    [Collection:HttpXMLColl]
       
        Data Source:HTTP XML:"http://login.bulksmsinmumbai.com/api/mt/GetBalance?User=demo&Password=demo123"
        XML Object:"BalanceResponse:1"
    
    [#Menu:GateWayOfTally]
        
         Add    :    Item    :    SMS Balance    :    Display    :    SMSBalance
        
    [Report:SMSBalance]
       
        Form    :    SMSBalanceReport
        Title    :    "SMS Balance"
       
    [Form:SMSBalanceReport]
       
        Part    :    SMSBalancePart
       
    [Part:SMSBalancePart]
       
        Line    :    SMSBalanceHeaders,SMSBalanceData
        Width    :    20% page
        Height    :    12% page
        Border    :    thin box
       
    [Line:SMSBalanceHeaders]
       
        Border        :    ThickTopBottom
        Space Top    :    0.5
        Space Bottom:    0.5
        Field        :    SMSBalance
        Local        :    Field    :    SMSBalance        :    Set as    :    "SMS Balance"
        Local        :    Field    :    SMSBalance        :    Align    :    Center
    
    [Line:SMSBalanceData]
       
        Field        :    SMSBalance
        Space Top    :    0.5
        Space Bottom:    0.5
       
    [Field:SMSBalance]
       
        Set as    :    $$CollectionField:$Balance:1:HttpXMLColl
        Width    :    20% Page
        Align    :    Center
     


  9. teja varma

    teja varma Active Member


    Code:
    
    [Collection:HttpXMLColl]
       
        Data Source:HTTP XML:"http://login.bulksmsinmumbai.com/api/mt/GetBalance?User=demo&Password=demo123"
        Export Header:"Content-Type:text/xml"
        XML Object Path:"BalanceResponse:1"
    
    [#Menu:GateWayOfTally]
       
         Add    :    Item    :    SMS Balance    :  Display:SMSBalance
       
    [Report:SMSBalance]
       
        Form    :    SMSBalanceReport
        Title    :    "SMS Balance"
       
    [Form:SMSBalanceReport]
       
        Part    :    SMSBalancePart
       
    [Part:SMSBalancePart]
       
        Line    :    SMSBalanceHeaders,SMSBalanceData
        Width    :    20% page
        Height    :    12% page
        Border    :    thin box
       
    [Line:SMSBalanceHeaders]
       
        Border        :    ThickTopBottom
        Space Top    :    0.5
        Space Bottom:    0.5
        Field        :    SMSBalance
        Local        :    Field    :    SMSBalance        :    Set as    :    "SMS Balance"
        Local        :    Field    :    SMSBalance        :    Align    :    Center
    
    [Line:SMSBalanceData]
       
        Field        :    SMSBalance
        Space Top    :    0.5
        Space Bottom:    0.5
       
    [Field:SMSBalance]
        Set as    : ( $$CollectionField:$Balance:1:HttpXMLColl)
        Width    :    20% Page
        Align    :    Center
    
    
     


  10. ROHIT JAISWAR

    ROHIT JAISWAR Active Member


    Awesome Sir, Now its Working Well Thank you Thank you So much Sir
    Thank you again..
    upload_2021-3-22_12-1-58.png
     


  11. Rohit Khedar

    Rohit Khedar Member


    Hi teja sir what possible chack Bank Balance by tally.
     
    Last edited: Mar 22, 2021


  12. teja varma

    teja varma Active Member


    Yes but you need to have the API gateway where we can get data regarding transactions.
    Every bank will have its own APIs, check with them.
     


  13. Rohit Khedar

    Rohit Khedar Member


    tnx sir ji but whose provide this bank api and not work netbanking id passsword
     


Share This Page