Questions tagged [xmlparsing]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
26 views

Apex + XmlStreamReader: Checking if XML element has text

I'm trying to use the XmlStreamReader class to read XML. I want to handle the scenario where the XML has an empty node, as with <Caption></Caption> in this example: <Book> <...
user avatar
-1 votes
1 answer
75 views

Parsing XML with nested XML document

I am trying to parse the following XML. <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=&...
user avatar
0 votes
1 answer
44 views

BuildRowSetFromXML with "attribute-id" with multiple data points? [closed]

I'm being asked to display some data coming through our XML feed in our emails. The data is coming through as a custom-attribute but appears as multiple data points that need to be displayed ...
user avatar
1 vote
0 answers
144 views

Get comma seperated values entered as design as columns in LWC

I am working on a lightning web component where i am trying to parse comma separated values(field names) entered in the Columns and add it to an array.but columns givies undefined value. HTML files: &...
user avatar
  • 11
0 votes
1 answer
49 views

Is it possible to go to aparticular node in a xml?

I am wondering how can I search a node once I parse an XML, I need to go to the node (attached at the end of the question) "data-block" and loop through all the children to extract the value ...
user avatar
  • 1,889
0 votes
0 answers
141 views

Convert large XML into PDF format as attachment

<?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd"> <pdf> <head> <link name="NotoSans" type=...
user avatar
1 vote
1 answer
510 views

How to respect non-self-closing br tags when apex parsing HTML with "Dom.Document" class

I'm trying to parse an HTML string. This string comes from a Salesforce rich text editor's content. It's a field saved on a record. String html = '<p>hello<br>goodbye</p>' String ...
user avatar
  • 1,179
1 vote
1 answer
781 views

Failed to parse XML

I've getting a problem when trying to parse an XML. The logs says: System.XmlException: Failed to parse XML due to: markup not allowed inside attribute value - illegal < (position: START_TAG seen ....
user avatar
0 votes
0 answers
460 views

"There are multiple root elements" error when previewing Email

We have an Order Confirmation email that is currently working, but requires some updates to the creative. After making the edits we get an error when trying to preview the email. The preview ...
user avatar
0 votes
1 answer
1k views

Unable to get the contents from xml and parse it in Apex class

///////////////////////////////////////////// <rss version="2.0"> <channel> <title>W3Schools Home Page</title> <link>https://www.w3schools.com</link> <...
user avatar
1 vote
0 answers
32 views

Serialize Workflow object to XML

I'm developing a test application that modifies the workflow by reading the retrieved Workflow files that are downloaded. The files are read, the workflow switch is modified and submitted to Metadata ...
user avatar
  • 1,079
0 votes
1 answer
288 views

XML to Data Extension

I am trying to find a way to automate a SOAP call and have the response which is in XML format being parsed and put into a data extension in the proper format (data to columns) I can create the SOAP ...
user avatar
0 votes
1 answer
149 views

BuildRowsetFromXml is returning empty nodes

I am trying to get the first name from the order confirmation but the field AMPscript returns is empty. This is my code: %%[ var @firstName var @lastName var @email var @products var @subscriberKey ...
user avatar
0 votes
0 answers
585 views

Populate XML with XSD Schema

I was provided an XML schema that (I think) I should be able to utilize to build out the XML string that I need to send to a web service. The two documented items in the Apex Developer Guide talk ...
user avatar
  • 3,181
0 votes
3 answers
19k views

How to send Post request to Rest API with XML data

I have created a rest API(apex class) in Salesforce. I have multiple nested tags in xml that comes via API request. I am wondering how do I define my post method in apex that could handle the request. ...
user avatar
  • 555
2 votes
1 answer
998 views

System.XmlException: start tag unexpected character =

This is the full error: System.XmlException: start tag unexpected character = (position: END_TAG seen ...<source> Bicycling</source><media:contenturl=... @1:688) So from my ...
user avatar
0 votes
1 answer
65 views

Parse responsexml in salesforce

I am integrating salesforce with an external SAP Application and I am getting the following response XML <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP:...
user avatar
  • 1,123
4 votes
1 answer
1k views

How to use BuildRowSetFromXML with an "attribute-id" in SFMC?

I'm having trouble referencing a specific item in our order XML feed. I want to reference a specific "attribute-id", not the entire rowset. XML reference: <custom-attributes> <...
user avatar
2 votes
2 answers
278 views

Salesforce: Issues in removing the entire child node in an xml

I have an xml , and I tried to remove an entire child nodes using the xml DOM process. Even i use the remove child method , the result says true but if i print the dom it still holds that child ...
user avatar
  • 165
0 votes
1 answer
106 views

System.NullPointerException: Attempt to de-reference a null object Error while parsing XML response

I am trying to parse the XML response and want to create the records only when url is present but when i am trying to create the record then i am getting the below error "Line: 83, Column: 1 System....
user avatar
  • 107
1 vote
2 answers
5k views

Parsing XML Response body in Apex

I want to parse the XML body and want to capture the url from the xml body in the list of string which i have created but i am getting Null values in the list Respnse body:- <retours> <...
user avatar
  • 107
2 votes
1 answer
2k views

Apex multi level apex parsing

Below is the XML format needs to be parsed with apex: <?xml version="1.0" encoding="UTF-8"?> <Parents> <SubParent> <SuperParent> <Child> ...
user avatar
-1 votes
1 answer
801 views

Parse XML values from a column in the DE?

I'm new with XML in SFMC, and I'm not sure if someone tried to execute the type of scenario, but I'm stuck with understanding the process of parse an XML payload form inside the SMFC. Is it even ...
user avatar
0 votes
1 answer
296 views

jQuery parseXML() no longer works since Summer '18

Since the Summer '18 patch the jQuery parseXML() is now throwing a "Invalid XML: .." error message. Sample code: try{ var xml = "<node>test</node>"; var xmlDoc = $.parseXML(xml); ...
user avatar
  • 344
3 votes
0 answers
241 views

How to populate XML

I saved an XML template file like the below in a library. Please note the text ApplicationTypeHolder and SubmissionTypeHolder in the file. I modified the original XML file and added those texts there. ...
user avatar
  • 476
-1 votes
1 answer
1k views

How to Read values from XML response?

I'm doing the adobe connect integration with salesforce.Here for getting the events list i wrote the REST API from that i'm getting the all events but for everytime it inserts the all events and ...
user avatar
2 votes
1 answer
70 views

How to parse the XML Data?

<event sco-id="1302640315" type="event" icon="event" permission-id="view"> <name>Salesforce Integration with External Systems</name> <domain-name>meet95927113....
user avatar
  • 21
1 vote
1 answer
111 views

Inserting a record after reading XML sent by external app

External app will send XML in their request to salesforce webservice class and webservice class will have to insert a object record.I have written a webservice and it is able to get the xml in string ...
user avatar
  • 1,395
1 vote
0 answers
221 views

Hitting Apex Heap Size limit

I'm trying to parse an XML response from a web service. The XML contains the information of the line items added to a quote as well as document data with the description of all line items. This ...
user avatar
1 vote
1 answer
6k views

Convert Apex XML response into JSON Format?

This is my result in xml format how can i convert this into JSON format in salesforce . (or) is there any other way directly deserialize the XML response. MyResult == : <?xml version="1.0" ...
user avatar
1 vote
1 answer
1k views

Comparison operator '<' & '>' AMPscript error in XSLT

Basically the email uses XSLT AMPScript to parse XML into the email. Part of the requirement is to count the items in the XML data and perform certain logics based on the item count. Since XSL uses ...
user avatar
  • 3,095
0 votes
1 answer
287 views

Consuming xml flat files in Salesforce [closed]

I have a business requirement, which says that xml files (with table and row like elements) are attached (uploaded) to a custom object, which will be done through the REST API. That's done. Now I ...
user avatar
1 vote
2 answers
9k views

XML parsing in Apex

I want to get the task Id from the below response. <?xml version="1.0" encoding="utf-8"?> <response> <task id="56639c84-7f73-4ace-b7ab-a46683ff0e25" registrationTime="2017-06-07T13:...
user avatar
  • 43
1 vote
1 answer
668 views

Ampscript and SSJS SOAP Call and read XML

I'm trying to make a soap post and get a rowset but I think that my xpath is bad-constructed. %%[ VAR @xml ]%% <script runat="server"> Platform.Load("core","1.1.1"); var url = 'http://...
user avatar
  • 171
5 votes
1 answer
580 views

Why is Xpath returning null for Salesforce SOAP query response?

I am using Xpath to attempt to parse and get data back from a SOAP Salesforce query response, I found the sample API request and response WSDL from this Salesforce Documentation. My SOAP Salesforce ...
user avatar
0 votes
0 answers
96 views

How to replace £ in XML

When I pass a String to XML I have £ Symbol.Suppose if the string is 'test£' then it gives the exception as invalid String as we have £ in String. Is that possible to replace this £ symbol. I tried &...
user avatar
0 votes
2 answers
2k views

Parsing XML response, Values preceded by delimited null in Debug, Returns Null variable assignment

I have an external system I am making a SOAP HTTP POST request to that has a simple response. I need to store both returned values as string variables for further processing. Here is the response from ...
user avatar
  • 113
0 votes
1 answer
316 views

How to sort line items by OrderLineStatus in XML when AMPScript is looping?

How do I show only items with OrderLineStatus as Shipped and @Published as false? Right now no items are being populated. Here is my xml based AMPScript: %%[ IF IndexOf(@xml,"<Published>") &...
user avatar
  • 1
0 votes
3 answers
1k views

How to Reorder XML tags

In the below code --> mapcolRows.put(subchildelement.getName(),subchildelement.getText()); subchildelement.getName() gets 'Enabled' and 'Name' tags in XML as shown below <Profile xmlns="http://...
user avatar
  • 122
1 vote
1 answer
3k views

XML Parsing of Package xml to Json string

I am trying to parse a package xml and make it as json string using DOM Parser in salesforce.But I am not getting result of JSON string.Below is my code: VF Page: <apex:page applyHtmlTag="true" ...
user avatar
0 votes
2 answers
1k views

How to read XML data in salesforce?

I get data in XML from a web service from a connector URL, the xml contains data about people, now I have to read the names, emailids from that xml and compare with my org's contacts and so some ...
user avatar
  • 133
-3 votes
1 answer
1k views

How to insert xml response in salesforce object [closed]

I want to insert XML Response (Quantity,InStock) into salesforce Custom object(Test__c) in custom fields (Quantity__c and Instock__c) based on SellerSKU.see below XML Response. Please Help me how to ...
user avatar
0 votes
1 answer
259 views

Issue with XmlStreamReader not getting the last xml element content

I have the following code to parse an xml script below class Cell { string data; } Integer rowCounter = 0; List<Cell> cells = new List<Cell>(); Map<Integer, List<Cell>> ...
user avatar
  • 125
1 vote
1 answer
775 views

getChildElement element failing null pointer exception

I have the below XML response which I am trying to parse through XML parser. But I am facing error i.e null pointer exception in debug log for the line: if(objXMLNode.getChildElement('...
user avatar
  • 2,503
1 vote
1 answer
2k views

Apex: How to get all child element of an xml? - Parsing xml via XmlStreamReader

I am trying to parse an MSXML which is a response from a web services via XmlStreamReader. The below code is the response from the web service: <?xml version="1.0"?> <?mso-application ...
user avatar
  • 125
2 votes
1 answer
1k views

How to Create Records from XML Data?

This is the webservice response I am Getting in XML Format. <?xml version="1.0"?> <ListOrdersResponse xmlns="https://mws.amazonservices.com/Orders/2013-09-01"> <ListOrdersResult> ...
user avatar
  • 948