Posted on November 24th, 2015 by Bishwaranjan Sandhu
Sometimes we need SQL Server tables’s data(tables with Primary-Foreign key relationship) as a XML type to workout some of our need. With the introduction of the XML datatype in SQL SERVER 2005, it provides the flexibility to generate XML type from the data contained inside sql server tables. Here in this tip, I will be […]
Posted on November 24th, 2015 by Vijai Vaishnav
In NetSuite you can generate the pdf, along with that you can also add form elements in your document like text box, drop-down list, and radio buttons to make your pdf more interactive. Also you can run JavaScript’s on your generated pdf. Here in this tip you would come to know how to run it. […]
Posted on November 24th, 2015 by Devi Das
n SQL Server 2000, for storing an XML content in Database, we were using text, varchar data types. But in SQl Server 2005 onwards a new data type has been introduced – XML data type. The difference between storing an XML content in text / varchar field and storing it in XML data type field is: We will be […]
Posted on November 23rd, 2015 by Tapan Pati
The new features in cucumber BDD for rails have been released by its developer, now ‘web_step.rb’ is no longer required. Sounds crazy? Sorry friends,first let me introduce what a web_steps.rb in cucumber is.. IN previous version of cucumber this web_steps.rb file was used for defining some basic functions so that pending cases outcome of cucumber […]
Posted on November 23rd, 2015 by Sandeep Saurabh
For creating a module in joomla we need two types of file. – PHP Scripts for business logic. – XML File for installing the Module and providing any default or administrative value to business logic codes. Other CSS and image files can also be included but these are optional according to the need. Easy Steps […]
Posted on November 23rd, 2015 by Subranil Dalal
When we create or read XML file in PHP we use DOM XML function. But PHP 5 provides a great function SimpleXMLElement(). This function is very simple to read or write any XML. This function is more simpler than DOM XML of PHP 4. SimpleXMLElement has lots of functions. Here I am discussing some basic […]
Posted on November 23rd, 2015 by Subranil Dalal
In many of our project works, we need to get geophysical location of an end user, including more information on country, state, city, timezone, offset time, based on the user’s IP address. Here I am using http://ipinfodb.com/ API to get the IP info in xml format. I make an Ajax call to PHP page which gets the XML […]
Posted on November 23rd, 2015 by Kabita Patra
This tip demonstrates how to create XML file using C# StringWriter stringwriter = new StringWriter(); XmlTextWriter xmlTextWriter = new XmlTextWriter(stringwriter); xmlTextWriter.Formatting = Formatting.Indented; xmlTextWriter.WriteStartDocument(); xmlTextWriter.WriteStartElement(“root”); xmlTextWriter.WriteStartElement(“information”); xmlTextWriter.WriteElementString(“FirstName”, “First Name”); xmlTextWriter.WriteElementString(“LastName”, “Last Name”); xmlTextWriter.WriteEndElement(); xmlTextWriter.WriteEndDocument(); XmlDocument docSave = new XmlDocument(); docSave.LoadXml(stringwriter.ToString()); //write the path where you want to save the Xml file docSave.Save(@”c:\Information.xml”); Output […]
Posted on November 23rd, 2015 by Monalisa Chakraborty
This tip explains how you can populate a datagrid with values of specific nodes of a XML file. The XML file we are taking in this example contains month names. We have to retrieve month names corressponding to particular nodes. The month node itself is further divided into 3 parts. The first part contains the […]
Posted on November 23rd, 2015 by Monalisa Chakraborty
In this tip we will see how to save datagrid values to an XML file. The data is to be stored in 3 nodes – data name, value and comment . The following code snippet demonstrates how to save datagrid values to an XML file. Dim objDoc As New XmlDocument() ‘object for access […]
Posted on November 23rd, 2015 by Monalisa Pradhan
If an XML file contains one tag that is used multiple times but in different context each time, it becomes a bit difficult extract and use each value programatically. In C# for instance, we could loop through the rows assigning values to variables but the same doesn’t hold true for XML (basically in stylesheet of […]
Posted on November 23rd, 2015 by Surama Hotta
This tip describes, how you can use a XSL(extensible StyleSheet file) inside a XML file to generate a HTML format of that file thus making it more user-friendly. Let’s Convert this XML File to a Html Format Using XSL StyleSheet: <?xml version=”1.0″ encoding=”utf-8″ ?> <?xml-stylesheet type=”text/xsl” href=”CDDemo.xsl”?> <StudentInfo> <Student> <id value=”11″ /> <addr use=”HP”> […]
Posted on November 23rd, 2015 by Ansuman Sahu
XML is very much becoming the standard and the most efficient way to exchange data between different computer programs. More and more organisations choose to use XML files to move data back and forth, rather than using the Microsoft Access 2007 files. In the coming days more often one will be asked to send a […]
Posted on November 23rd, 2015 by Ansuman Sahu
Using XML as the interface moving information back and forth between computers is very easy. Microsoft Access 2007 recognizes XML files provided they have the structure expected by the software. The best part of this whole process of using XML files is that they can be used with many applications running on many different operating […]
Posted on November 23rd, 2015 by Naibedya Kar
XML is a simple and flexible system for defining data formats. This is completely platform independent and adopted everywhere for representing complex documents and data structures. For data transmission on web, its having significant contribution. Now days it’s been the major use of XML to store both rowset (single table) and hierarchical (multiple-table) data in […]
Posted on November 23rd, 2015 by Surama Hotta
Sometimes we need to display the data that are present in a xml file in a tabular format. Following code explan how to display a tabular format of the XML file by applying XSL stylesheet. XML-FILE <?xml version=”1.0″ encoding=”utf-8″ ?> <?xml-stylesheet type=”text/xsl” href=”showtableformat.xsl”?> <StudentInfo> <Students> <FirstName>Monali</FirstName> <LastName> Nayak </LastName> </Students> <Students> <FirstName>Sarita</FirstName> <LastName> Dash </LastName> […]
Posted on November 23rd, 2015 by Naibedya Kar
XML is a simple and flexible system for defining data formats. This is completely platform independent and adopted everywhere for representing complex documents and data structures. For data transmission on web, its having significant contribution. It is very common to use dataset in .NET applications. A dataset may contain a single table or multiple tables […]
Posted on November 23rd, 2015 by PRADEEP PENTAPATI
To create XML using LINQ as follows Step 1: XElement class takes care of converting the LINQ query resultant into data in XML format. So, declare the name space “using System.Xml.Linq;” Step 2: Now, the LINQ query should be written in the below format: DataClassesDataContext dlDC = new DataClassesDataContext(); var inventory = new XElement(“InventoryINFO”, from […]
Posted on November 23rd, 2015 by Amrita Dash
When generating a XML string from SQL queries we use the clause FOR XML PATH(‘Detail’), TYPE . But if the query returns some null values the element tag will be removed in the resulting XML. To get the null values as elements in the resultant XML string , we need to use the clause [ […]
Posted on November 23rd, 2015 by Priyojit Mondal
Suppose we need the following XML format, <ProductData> <Item> <Key> <StockCode>1230098-ASU-DRED</StockCode> </Key> <Description>T E S T Final</Description> <LongDesc>Arizona State University</LongDesc> <AlternateKey1>686699454647</AlternateKey1> </Item> <Item> <Key> <StockCode>1230098-PSY-GREY</StockCode> </Key> <Description>T E S T Final</Description> <LongDesc>Arizona State University</LongDesc> <AlternateKey1>686699454649</AlternateKey1> </Item> </ProductData> Now the serialization classes will look like this, [XmlRoot(“ProductData”)] public class INVSSTDOCP { [XmlElement(“Item”)] public ProductParam[] Parameters { […]
Posted on November 23rd, 2015 by Swarup Sahu
n one of my projects, I need to generate XML response for a request. The XML response is like below: <?xml version=”1.0″ encoding=”UTF-8″?> <result>result</result> <error>error number</error> <message>Message text</message> But when I tried to retrive the XML from another page by putting a request, I found an error: ‘parser error : Extra content at […]
Posted on November 23rd, 2015 by Amrita Dash
There are certain characters like ” < , > , ‘, and & ” which are invalid as XML characters. To replace these characters with valid characters we can use the [SecurityElement.Escape] method. It uses System.Security namespace. And replaces the characters with [“<” ,”>”, “"”,”'”,”&”]. When sending an xml parameter to SQL SP as input, […]
Posted on November 23rd, 2015 by Swaraj Gochhayat
Often we deal with XML content/files in our projects, for read/write/parse/save/delete etc.. operations. The two classes that will come handy in this case are XDocument and XmlDocument. XDocument is what we know as the extended version of XmlDocument which was the standard DOM-Style API for XML whereas the former is the LINQ to XML API. […]
Posted on November 23rd, 2015 by Danish Ahmed
Most of us are aware of how to escape characters in HTML, so that the browser doesn’t process them but still then we do come across instances where characters we have provided in the content is actually treated as code by the browsers. This is especially true when you are working with XML or XHTML […]
Posted on November 23rd, 2015 by Sourabha Sahoo
Sometimes we face cross domain error like XMLHttpRequest cannot load [URL]. Origin [YOUR WEBSITE] is not allowed by Access-Control-Allow-Origin while fetching data from rss feeds directly through the browser. Here the browser security prevents direct fetching of data from other domains unless the domain host includes the Access-Control-Allow-Origin header.So the basic solution is to use […]
Posted on November 23rd, 2015 by Satyadeep Kumar
Suppose, in a web application we need to create some files (say xml reports) and then show it to the user. One of the simpler ways to view those files would be through a popup() page. This is what is explained below: Solution: Let our web application display XML files from a specific directory location (say “C:\XML Files”) […]
Posted on November 23rd, 2015 by Srinivasa Alapati
We may need to send multiple records to database from code behind, at that situation we will make multiple requests to db. If the number of records increased than it may take performance penalty. If we send all the records at once to database then performance will be increased. One of the method to send […]