Banging my head trying to parse XML

Banging my head trying to parse XML

Hi

I am trying to parse an XML in ZOHO CRM.
I was able to add a field for the XML to be uploaded so it can be parsed later

So far I am able to get the file data just fine, and even to get to the important node of the XML (it's embedded with CDATA)

But there are two things I don't know how to do:

1. get values only instead of <key>value</key>
2. how to get a list of values, for instance detalles may contain one or several detalles, so I want to get all of detalles in a collection and parse them in a loop to get the required values.

  1. if(factura.get("Archivo_XML") != null)
    {
        file = factura.get("Archivo_XML");
        url = file.toCollection().get("download_Url");
        url = "https://crm.zoho.com" + url;
        file = file.toCollection().get("file_Id");
        // to fetch file from the cloud using invokeUrl task
        fileVariable = invokeurl
        [
            url :"https://www.zohoapis.com/crm/v5/files?id=" + file
            type :GET
            connection:"zoho_crm"
        ];
        //response = fileVariable.getFileContent();
        //response = response.toXmlList();
        //info "response: " + response.executexpath("autorizacion/estado");
        //info "response: " + response.executexpath("autorizacion/numeroAutorizacion");
        startFactura = response.find("<infoFactura>");
        endFactura = response.find("</infoFactura>");
        infoFactura = response.subText(startFactura,endFactura) + "</infoFactura>";
        
        data = infoTributaria.executexpath("infoFactura");
        info data;
        data = infoTributaria.executexpath("infoFactura/fechaEmision");
        info data;
        data = infoTributaria.executexpath("infoFactura/totalConImpuestos/totalImpuesto");
        info data;
        
    }

This is my current code,

This part:

  1.     data = infoTributaria.executexpath("infoFactura/fechaEmision");
  2.     info data;

Produces

  1. <fechaEmision>08/09/2023</fechaEmision>

    Access your files securely from anywhere

          Zoho FSM Video Tutorials


                All-in-one knowledge management and training platform for your employees and customers.






                                      Zoho Developer Community




                                                            • Desk Community Learning Series


                                                            • Digest


                                                            • Functions


                                                            • Meetups


                                                            • Kbase


                                                            • Resources


                                                            • Glossary


                                                            • Desk Marketplace


                                                            • MVP Corner


                                                            • Word of the Day


                                                            • Ask the Experts



                                                                      • Sticky Posts

                                                                      • Function #46: Auto-Calculate Sales Margin on a Quote

                                                                        Welcome back everyone! Last week's function was about displaying the discount amount in words. This week, it's going to be about automatically calculating the sales margin for a particular quote, sales order or an invoice. Business scenario Where there is sales, there's also evaluation and competition between sales reps. A healthy rivalry helps to better motivate your employees to do smart work and close deals faster and more efficiently. But how does a sales rep get evaluated? 90% of the time, it's
                                                                      • Zoho CRM Functions 53: Automatically name your Deals during lead conversion.

                                                                        Welcome back everyone! Last week's function was about automatically updating the recent Event date in the Accounts module. This week, it's going to be about automatically giving a custom Deal name whenever a lead is converted. Business scenario Deals are the most important records in CRM. After successful prospecting, the sales cycle is followed by deal creation, follow-up, and its subsequent closure. Being a critical function of your sales cycle, it's good to follow certain best practices. One such
                                                                      • User Tips: Auto-Create Opportunity/Deal upon Quote Save (PART 1)

                                                                        Problem: We use quotes which convert to sales orders but Users / Sales Reps do not create opportunities / deals and go straight to creating a quote. This leads to poor reporting. Implementing this solution improves reporting and makes it easier for users.
                                                                      • Custom Function : Automatically send the Quote to the related contact

                                                                        Scenario: Automatically send the Quote to the related contact.  We create Quotes for customers regularly and when we want to send the quote to the customer, we have to send it manually. We can automate this, using Custom Functions. Based on a criteria, you can trigger a workflow rule and the custom function associated to the rule and automatically send the quote to customer through an email. Please note that the quote will be sent as an inline email content and not as a PDF attachment. Please follow
                                                                      • Function #50: Schedule Calls to records

                                                                        Welcome back everyone! Last week's function was about changing ownership of multiple records concurrently. This week, it's going to be about scheduling calls for records in various modules. Business scenario Calls are an integral part of most sales routines.. Sales, Management, Support, all the branches of the business structure would work in cohesion only through calls. You could say they are akin to engine oil, which is required by the engine to make all of it's components function perfectly. CRM


                                                                      Manage your brands on social media



                                                                            Zoho TeamInbox Resources



                                                                                Zoho CRM Plus Resources

                                                                                  Zoho Books Resources


                                                                                    Zoho Billing Resources

                                                                                      Zoho Projects Resources


                                                                                        Zoho Sprints Resources


                                                                                          Qntrl Resources


                                                                                            Zoho Creator Resources



                                                                                                Zoho CRM Resources

                                                                                                • CRM Community Learning Series

                                                                                                  CRM Community Learning Series


                                                                                                • Kaizen

                                                                                                  Kaizen

                                                                                                • Functions

                                                                                                  Functions

                                                                                                • Meetups

                                                                                                  Meetups

                                                                                                • Kbase

                                                                                                  Kbase

                                                                                                • Resources

                                                                                                  Resources

                                                                                                • Digest

                                                                                                  Digest

                                                                                                • CRM Marketplace

                                                                                                  CRM Marketplace

                                                                                                • MVP Corner

                                                                                                  MVP Corner






                                                                                                    Design. Discuss. Deliver.

                                                                                                    Create visually engaging stories with Zoho Show.

                                                                                                    Get Started Now


                                                                                                      Zoho Show Resources

                                                                                                        Zoho Writer

                                                                                                        Get Started. Write Away!

                                                                                                        Writer is a powerful online word processor, designed for collaborative work.

                                                                                                          Zoho CRM コンテンツ


                                                                                                            Nederlandse Hulpbronnen


                                                                                                                ご検討中の方





                                                                                                                          • Recent Topics

                                                                                                                          • Zoho Extensions 101: Building extensions for Zoho People

                                                                                                                            Hello developers! Welcome to our new video series on building extensions for Zoho People! If you're new to extension development or looking for guidance on building extensions for Zoho People, you're in the right place. We've curated a series of videos
                                                                                                                          • Any update on much requested feature, to delete attachments without deleting the e-mail body?

                                                                                                                            People have been requesting the ability to delete e-mail attachments without deleting the e-mail for more than ten years now. The latest I see is marked "Working On It" and a year ago it was supposedly being added, see here: https://help.zoho.com/portal/en/community/topic/is-there-a-way-to-delete-mail-attachments-without-deleting-the-text
                                                                                                                          • Undo/redo when composing Mail

                                                                                                                            Where is the undo/redo button when composing mail? I've new to Zoho, I've looked, I've searched and can't find it. What am I missing?
                                                                                                                          • Mail menu bar items missing in Inbox and folders

                                                                                                                            Last night some shortcuts such as Move to Folder, Archive, Delete, Mark as spam, and others, disappeared from my Mail menu bar, along with items in the vertical three dots extension such as Mark as read, Flag as, Mark as unread, etc. What I now have instead
                                                                                                                          • ERROR CODE :554 - Your access to this mail system has been rejected due to poor reputation of a domain used in message transfer

                                                                                                                            This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. *****, ERROR CODE :554 - Your access to this mail system has been rejected due
                                                                                                                          • Sent items with shared folders

                                                                                                                            Hello, this is in some way in between a problem and an idea.  When sharing folders (which is actually not any close to a shared mailbox...) the person which the folder has been shared with can access that folder and can send emails when delegation is
                                                                                                                          • Losing description after merging tickets

                                                                                                                            Hello, We merge tickets when they are about the same topic from the same client. It happens sometimes. We recently noticed that after the merger only the description from the master ticket is left in a thread. And the slave-ticket description is erased.
                                                                                                                          • What's New in Zoho Inventory | July & August 2026

                                                                                                                            Hello users, The July and August 2026 releases bring a range of new features and improvements across the product. From the Nigeria Edition and Super Admin enhancements to Sri Lanka IRD-compliant invoicing, Loyalty Program Management, and improvements
                                                                                                                          • E-mail com problema

                                                                                                                            Não estou recebendo e-mail desde Janeiro. Algo desconfigurou e eu não consigo resolver. Podem ajudar? Aguardo. Wagner Della Aversana Whats 55 11 985119899
                                                                                                                          • Account Blocked due to Suspicious Activity.

                                                                                                                            Hello, Trying to get access to my account, I have found this message above in the subject of this message. I am unable to log back to my account (see err. mess. below.) and thus cannot get rif of this following the Zoho procedure : I followed the step
                                                                                                                          • Widget Height were destroyed

                                                                                                                            All widget heights in the Details Canvas view are broken. Moderation Update: This issue with widget heights in Client Script popups and flyouts has been resolved. Widgets should now display at their expected heights.
                                                                                                                          • SAML authentication in Zoho Mail: Simplify and secure your organization's login management

                                                                                                                            Managing login credentials across multiple web applications can be challenging for organizations with a large number of users. Without a centralized authentication system, users are required to maintain separate passwords for each application, increasing
                                                                                                                          • How to prepare a balance sheet for a company that has no operations yet?

                                                                                                                            .
                                                                                                                          • Can't create new account in zoho email

                                                                                                                            Hello, i'm trying to create some free accounts to my customers... and since yesterday i can't create a new account, what is wrong? why i can't create free account? Thank You
                                                                                                                          • Name autocomplete

                                                                                                                            Hi, During searching emails the web tool does not always propose the auto-completion of the saved emails. As a result I either have to go to contacts and look up the exact email, or the exact full name including the middle name and any dots, which is
                                                                                                                          • Merge Tickets Directly from Contact Page in Zoho Desk

                                                                                                                            Dear Zoho Desk Support Team, We are writing to request a new feature that would allow users to easily merge tickets directly from the contact page in Zoho Desk. Currently, the only option to merge tickets is from the Tickets list view page, which can
                                                                                                                          • Introducing Incentives for Zoho CRM: Build, automate, and track sales commissions

                                                                                                                            Dear Customers, We are here with an amazing news! We built a direct solution to help manage your commission provisioning activity in your business. From creating commission plans to issuing payouts, this application leverages your sales reps’ performance
                                                                                                                          • Specific ListView Canvas on Canvas Home Page Always Loads Most Recent ListView, Not the One Specified

                                                                                                                            I had mentioned this to ZOHO, but I mainly wanted to see if others in the Community are also facing this problem. I created a Canvas ListView for a Custom Module, and then created a Canvas Home page (technically on a tab item, but I'm not sure if that
                                                                                                                          • Reminder Settings - Time Tracker

                                                                                                                            On the time tracker in Reminder Settings I created a reminder according to the Zoho manual. But a manager asked me to change the message that goes in the email. Is it possible to change the message? I didn't find that in the Zoho manual. Another question: I configured to receive the reminder everyone who logged in less than 40 hours. Does Zoho consider less than 40 hours of the current week or the whole month? Another situation, I put it so that I and another specific user would receive the notification,
                                                                                                                          • Create a single record from multiple images with ICR

                                                                                                                            Hello all, Zia's Intelligent Character Recognition can now create a single record from multiple images based on the configured ICR rule. Users can upload up to three images at once, such as an ID, a passport, and a business card, and Zia will extract
                                                                                                                          • SPF failure in android app

                                                                                                                            I have no domain. I am not admin of anything. All I want to do is send an email from a zohomail.eu address, using the Zoho android app, with all settings as default. I do not use Office 365, or EOP, or Outlook, and I have no domain or domain registrar.
                                                                                                                          • Zoho Books | Product updates | August 2026

                                                                                                                            Hello users, July has been an exciting month for Zoho Books! This month, we're excited to introduce HTML PDF Templates, Placeholders as Pills, expanded approval workflows for Sales Returns and Journals, and significant compliance updates across the India,
                                                                                                                          • Page Not Found error - 404 error

                                                                                                                            Hello, I am a first time user of zoho sites.I just published my website dentistinminneapolis.com but its giving me a 404 error.Please look into it ASAP and help with the problem.
                                                                                                                          • What's New in Zoho POS - September 2026

                                                                                                                            Hello everyone, Welcome to Zoho POS’s monthly update, where we share our latest feature updates, enhancements, events, and more. Let’s take a look at how September went. Global Edition of Zoho POS for Retail is here On September 28, 2026, we launched
                                                                                                                          • New in Cadences: WhatsApp follow-ups, upgraded limits, and options for add-ons

                                                                                                                            Hello everyone, We're rolling out two key updates to help you engage better and scale smarter with Cadences in Zoho CRM. Reach customers on WhatsApp, directly from Cadences Previously, Cadences have enabled you to automate follow-ups through emails, calls,
                                                                                                                          • Announcing new features in Trident for Windows (v.1.43.5.0)

                                                                                                                            Hello Community! This release includes a collection of enhancements and feature updates aimed at making your email and collaboration experience smoother. Let’s dive into what’s new! Zoho Desk email notifications as Smart Mail. Zoho Desk Smart Mail is
                                                                                                                          • How to Manage Two GST Numbers / Two Companies in a Single Zoho Inventory Organization?

                                                                                                                            Hi Team, We currently have two separate legal entities: A Proprietorship Firm with its own GSTIN A Private Limited Company with a different GSTIN However, operationally, both companies deal with the same products, and we would like to manage the physical
                                                                                                                          • How To Implement an Auto-Check-out Feature for Attendance?

                                                                                                                            If an employee forgets to check out, the system should automatically check out the employee at 6:30 PM
                                                                                                                          • Convert an Existing Single Item into an Item with Variants

                                                                                                                            Hello Zoho Team, Introducing variants is a great addition to Zoho Inventory. However, we would like to request an option to convert an existing single item into an item with variants. For example, Item A initially comes in only one colour, so we create
                                                                                                                          • IP Address List > Sigma

                                                                                                                            We have developed a ZohoCRM extension that utilizes API calls to our server from Deluge scripts and Widgets. Our API server has IP restrictions in place. To ensure successful communication, we require a list of IP addresses utilized by Zoho's platform
                                                                                                                          • Default Country list suggestions on CRM is different then on Book; how do/did others address this?

                                                                                                                            So I already have a support ticket in for this and waiting for a response but figured I'd ask the community also to see if others experienced the same problems and/or how they went about addressing it because sometimes I feel like I'm going crazy with
                                                                                                                          • Object-level edit permissions

                                                                                                                            Hi, we are currently running into a limitation with permissions inside larger workspaces. Our use case is a central Analytics workspace that contains many tables, Query Tables, reports and dashboards used by different teams. We would like to allow certain
                                                                                                                          • Convert Sales order to Delivery Challan

                                                                                                                            Dear Developer Team, In Zoho books we cannot convert sales order into delivery challan before making invoices. As a service business we have to get the delivery note signed then only we can make the invoice. In Some cases we don't receive a purchase order
                                                                                                                          • What's New in Zoho Inventory | September 2026

                                                                                                                            Hello users, September brings a range of new features and enhancements across Zoho Inventory. From improved inventory operations and reporting capabilities to greater customization, automation, and enhancements to Delivery Challans, there’s plenty to
                                                                                                                          • Mirror Component in Zoho CRM: Access real-time related data without leaving your record

                                                                                                                            Hi everyone, This feature is now available for the JP, CA, SA, UAE, and AU DCs. We're excited to bring to you Zoho CRM's mirror component, which presents relevant data on a record's details page and keeps everything users need in one place without having
                                                                                                                          • All new Address Field in Zoho CRM: maintain structured and accurate address inputs

                                                                                                                            Availability Update: 29 September 2025: It's currently available for all new sign-ups and for existing Zoho CRM orgs which are in the Professional edition exclusively for IN DC users. 2 March 2026: Available to users in all DCs except US and EU DC. 24
                                                                                                                          • Create custom rollup summary fields in Zoho CRM

                                                                                                                            Hello everyone, In Zoho CRM, rollup summary fields have been essential tools for summarizing data across related records and enabling users to gain quick insights without having to jump across modules. Previously, only predefined summary functions were
                                                                                                                          • How to mix different types of inputs (such as dropdown list and textbox)

                                                                                                                            Hi, I'm creating a form called "Room Reservations" for a company. I created a "table" using "Matrix Choice". I created "Room 1", "Room 2" and "Room 3" with the "Questions". I would then like to create two columns with the "Answers", one called "Department"
                                                                                                                          • Feature Request: Render Markdown (.md) files in Zoho Cliq

                                                                                                                            Hi, We regularly share Markdown (.md) files in Zoho Cliq. However, when we open these files in Cliq, the content does not render as Markdown—it displays as plain text. This forces us to copy/paste the content into an external Markdown viewer to read it
                                                                                                                          • Dealing With One-Time Customers on Zoho Books

                                                                                                                            Hello there! I am trying to figure out a way to handle One-Time customers without having to create multiple accounts for every single one on Zoho Books. I understand that I can create a placeholder account called "Walk-In Customer", for example, but I
                                                                                                                          • Next Page