CFanatic

Go Back   CFanatic > Programming > Win32 Programming

Join CFanatic Forum Now

Using XML in Java topic posted under Win32 Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 12-27-2010, 06:54 AM
Junior Member
 
Join Date: Dec 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Elektri4ka is on a distinguished road
| More
Using XML in Java

Please tell me how it realized.
Reply With Quote
  #2  
Old 11-12-2011, 04:34 AM
Junior Member
 
Join Date: Aug 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
charlesth is on a distinguished road
| More
Re: Using XML in Java

In Java JDK there are two built-in XML parsers. In Java, it's still simpler than that due to Java's tough Unicode support. You don't want to know any particular APIs like DOM or SAX or JDOM. All you have to be recognizable with how to System.out. println(). If you want to pile up your XML document in a file, you can use the FileOutputStream class instead.

Here I am showing the A program that calculates the Fibonacci numbers using the XML with Java.
Code:
import java.math.BigInteger;

public class FibonacciNumbers {

  public static void main(String[] args) {
  
    BigInteger low  = BigInteger.ONE;
    BigInteger high = BigInteger.ONE;
    for (int i = 1; i <= 10; i++) {
      System.out.println(low);
      BigInteger temp = high;
      high = high.add(low);
      low = temp;
    }
    
  }

}
I realized that XML with Java is not complicated but it is useful for developing such kind of Program.

Last edited by shabbir; 11-12-2011 at 04:36 AM. Reason: Code Blocks
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting program to work via IE browers with JAVA Applet qthuanfdn@gmail.com C# Programming 0 08-28-2010 03:00 AM
Java Interview JokesBot The Lounge 0 10-29-2006 02:51 AM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 03:08 PM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board