If we want to use Ant Migration tool to fetch Salesforce Organization metadata info or to deploy some changes to Salesforce, we need to create “
package.xml” manually or take help of eclipse. wildcard character (*) doesnt work with some components like report, emailtemplate, dashboard and document. Package.xml must needs to have folder name and files inside folder name. After getting package.xml from eclipse, what if some folder is added into Organization ? We need to update “package.xml” again with help of eclipse or do it manually. Therefore I wanted to automate generation of package.xml completely and came up with this article and below workaround.
I would be using Ant to generate “package.xml” with below steps
get Ant Migration tool jar from
here get AntContrib from
here create basic template of “package.xml” with placeholders in place of Report, Dashboard, EmailTemplate and Document,
sample here create Ant Macro to replace placeholders
create second Ant Macro to fetch all folders available using Metadata API (using sf:listMetadata)
create third Ant Macro to fetch files inside each folder using Metadata API (using sf:listMetadata)
Continue reading “Auto generate Package.xml using Ant – complete source code and Video”
Why should I use JSON over XML ? Why JSON is given so importance these days ?
Many questions like these are asked many times by new developers. So, I decided to write this article. However last year I presented same topic and uploaded in SlideShare.
Before Winter12 release, for JSON related stuff we had to depend on external Libraries. However in Winter12, salesforce has added support for JSON natively on force.com plateform. Also, on every release Salesforce is making required changes in JSON library to make it more stable and more usable.
I have shared many topics on JSON in past, on which you can have a look. Continue reading “Why should I use JSON over XML ?”
Step by Step Example of creating SOAP Message using core Java API
In this article, i am going to create the
SOAP Message by using core Java Only. SOAP Stands for ” Simple Object Access Protocol”, which is used to exchange the structured information via Webservices.
SOAP Message consist of following three parts:
SOAP Message Format for Web Services
Continue reading “Create SOAP message using Java”
Validate XML Schema Using DOM Parser and SAX Parser in JAVA Using Swing
In this article, i am going to use the Swing for the UI purpose and for the XML validation against its schema i will use DOM parser as well as SAX Parser.
previously we have already seen that how these parsers works in detail.
Application output will look like below snap:
Input Screen - XML Schema Validation in JAVA Using DOM and SAX Parser
Continue reading “Validate XML Schema Using DOM Parser and SAX Parser in JAVA Using Swing”
What is the difference between SAX And DOM Parsers
In Previous articles we have discussed about JAXP in detail.
To summarize all, lets discuss difference between both approach.
Continue reading “Difference between SAX and DOM Parsers”
XML Tree Viewer using SAX Parser in JAVA with Jtree,JFileChooser component of Swing, How to refresh Jtree when content changes , Expand or collapse JTree
I am going to create a utility application in JAVA for reading the XML document using SAX parser. The application will look like:
XML Tree Viewer using SAX Parser in JAVA
Continue reading “XML Tree Viewer using SAX Parser in JAVA with Jtree,JFileChooser component of Swing”
Example of Reading XML File using SAX Parser in JAVA
We have already discussed about the
DOM Parser of JAXP. This article will focus on Reading XML file using SAX Parser:
Continue reading “Read XML File using SAX Parser in JAVA”
Example of Searching XML File using DOM Parser of JAXP
Until now, we have already seen two examples of DOM Parser provided by JAXP:
Create XML file using DOM
Traverse xml file
In this tutorial, we will learn how to search the XML file for particular node in DOM Parser
Continue reading “Searching XML File using DOM Parser of JAXP”
Example of Traverse XML file using DOM Parser of JAXP
Check this post to get the idea about how to
create XML document using DOM Parser and XSLT API.
In DOM Parser of JAXP,
textContent() method of node does not give the text for that node. We must typecast the node to Element and then try this method.
See below code for implementation:
Continue reading “Traverse XML file using DOM Parser of JAXP”
Example of Creating XML File using JAXP and Transformation APIs