Questions tagged [dom]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
47 views

Getting Attempt to de-reference a null object in DOMParser in salesforce

I wrote a class which given below. public class DomDocument { Public void parseXmlFile(String xml){ Dom.Document doc=new Dom.Document(); doc.load(xml); Dom.XmlNode node=...
1
vote
1answer
510 views

How to pass the XML as a url in DOMParser

I found the following details from the Reading and Writing XML Using the DOM in online salesforce. As in the page shows, following one is XML file. <address> <name>Kirk Stevens</...
1
vote
1answer
337 views

How do I maintain state for Dom.Document type variables between Start and execute method of a batch [closed]

I want to create a XML Head in start method of a batch class. I was getting "System.SerializationException: Not Serializable: dom.Document" error for DOM. To handle this I declared all the variables ...
4
votes
1answer
8k views

How to modify innerHTML/DOM of an HTML element in a lightning component?

I am trying to dynamically create a picklist in a lightning component which aligns with the lightning design system look and feel. The lightning design system says that we should create it as given in ...
1
vote
1answer
39 views

HTML elements issue in visualforce

I have the following html structure in my VF page (docType="html-5.0"): <a class="outer"> <span>Some text</span> <span><a class="innerLink"></a></span&...
7
votes
2answers
1k views

DOM manipulation using External libraries in lightning component

As per the LC documentation and answers to the below questions: 1.Jquery selector is not working properly in subsequent loads in lightning component. 2.DOM modification feasibility in lightning. It'...
8
votes
2answers
3k views

How to add a <meta>-Tag for an Lightning app

Is possible to add a <meta> tag for my Lightning application? Within the Salesforce1 mobile application my iPhone turns a custom-formatted date visualization into a hyperlink to create a native ...
3
votes
2answers
1k views

Map one xml to List of SObject?

I am quite new in Xml parsing. i am having a XMl <company> <account> <id>8c98a6be</id> <label>4356</label> <reference>4356</reference> </...
1
vote
1answer
345 views

getBodyDocument - XmlException: unexpected markup &lt;

For example I want to connect to http://www.google.com and get DOM. In Anonymous Window I have code: String url = 'http://www.google.com/'; HttpRequest req = new HttpRequest(); ...
4
votes
0answers
378 views

How to Address DOM-based XSS from Security Review

I have a remoting function on my page that takes a list of contacts, and displays them in on Lightning Design styled page. It works fine, but the final innerHTML statement gets flagged in security ...
2
votes
1answer
515 views

VF Page on-click events for HTML elements

I have a checkbox on my VF page, with the label in a <TD> element of the table, and the checkbox in a <TD> element next to it like this: <tr> <td class="LeftColumnTop W50" ...
0
votes
1answer
497 views

Null pointer exception when parsing XML

DOM.Document xmlDOC = new DOM.Document(); xmlDOC.load(xmlstring); DOM.XMLNode rootElement = xmlDOC.getRootElement(); for(DOM.XMLNode xmlnodeobj:xmlDOC.getRootElement().getChildElements()){ For(...
3
votes
2answers
324 views

How to copy one XML Dom onto another?

I have a need to merge one XML document into another. I'm hoping for a more direct way than the one I've come up with. Given two documents where I want to put B inside A, I can convert B to a string,...
2
votes
1answer
2k views

How to form SOAP XML request to update Salesforce dara

Is anyone has some idea how can i use DOM or XmlStreamWriter to generate SOAP XML request for Salesforce? Can we use these classes to generate SOAP XML request or not? I tried following code but ...
3
votes
2answers
370 views

How to remove prefix of apex:form from elements?

I amworking on a Visualforce Project where I need to access elements from a form via jQuery. The problem is that the elements always get a prefix like j_id0:j_id4: in the ID. Therefore I can't access ...
2
votes
1answer
313 views

Parse XML fails with null object dereference

I have below code that fails to execute in developer console, I receive the following error: Attempt to de-reference a null object. Can someone please help here? Apex class: public class ...
1
vote
0answers
409 views

Apex DOM get children at nth level

I have got the XML of the following format: <parNode> <parNode2> <parNode3> <parNode4 name="name1"> <flags attrVal="1" /> ...
2
votes
1answer
3k views

Error converting HttpResponse to Dom.Document

I am calling the Tooling API from Apex in order to find out if a Custom Field has been created. Here is my code: HttpRequest req = new HttpRequest(); req.setHeader('Authorization', '...
1
vote
1answer
2k views

what is the use DOM in sales force where we can use that?

I have understanded the abbrevation of DOM,but iam not understanding what is use of that in sales force.Is there any link between xml and DOM.

1
2