<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>My Programming Journal</title>
	<atom:link href="http://kaansoral.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://kaansoral.com</link>
	<description>Hello World!</description>
	<lastBuildDate>Thu, 26 Aug 2010 13:37:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Algorithmium for algorithmic problems</title>
		<link>http://kaansoral.com/?p=245</link>
		<comments>http://kaansoral.com/?p=245#comments</comments>
		<pubDate>Thu, 26 Aug 2010 13:37:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kaansoral.com/?p=245</guid>
		<description><![CDATA[Algorithmium is a place where me and my friends post solutions of problems when we solve them. I can&#8217;t find much time lately but if you are interested there are some good contents. Also you can post your own solutions to the site.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://algorithmium.com">Algorithmium</a> is a place where me and my friends post solutions of problems when we solve them. I can&#8217;t find much time lately but if you are interested there are some good contents. Also you can post your own solutions to the site.</p>
]]></content:encoded>
			<wfw:commentRss>http://kaansoral.com/?feed=rss2&amp;p=245</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaFX and Facebook, the solution</title>
		<link>http://kaansoral.com/?p=243</link>
		<comments>http://kaansoral.com/?p=243#comments</comments>
		<pubDate>Mon, 05 Apr 2010 16:50:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[javafx facebook]]></category>
		<category><![CDATA[ria facebook]]></category>

		<guid isPermaLink="false">http://kaansoral.com/?p=243</guid>
		<description><![CDATA[When I started this blog, I was rambling with Facebook, JavaFX and alternative technologies.
It turned out that JavaFX is not ideal for social application development, because of various reasons.
Let alone JavaFX, applets are also not very ideal for social application development, if a RIA is necessary Flash is the solution, not even Flex.
Anyway Turning a [...]]]></description>
			<content:encoded><![CDATA[<p>When I started this blog, I was rambling with Facebook, JavaFX and alternative technologies.</p>
<p>It turned out that JavaFX is not ideal for social application development, because of various reasons.<br />
Let alone JavaFX, applets are also not very ideal for social application development, if a RIA is necessary Flash is the solution, not even Flex.</p>
<p>Anyway Turning a JavaFX application to a Facebook application Is really simple.<br />
Deploy your JavaFX application for web, in order for it to launch in browser you have to use only WEB components, if you add Desktop components, Java classes etc. You can deploy it but It will not be really a Web application. It can only run in Web when the user download and confirm. It will seem like a Web application but its not.</p>
<p>The method I am going to explain applies for everything, not just JavaFX.</p>
<p>Create an application on Facebook, go to Canvas and point the application to http://yourdomain.com/javafxdeploy.htm<br />
And from Canvas Tab choose &#8220;IFRAME&#8221;!!!!</p>
<p>I emphasized this point because Iframe application can show anything as a Facebook application.</p>
<p>You can alternatively Develop a &#8220;FBML&#8221;!!! application and use &#8220;fb:iframe&#8221; tag and point it to http://yourdomain.com/javafxdeploy.htm</p>
<p>This way you can include fancy stuff like SHARING POINTS with Feed forms etc.</p>
<p>The thing is that you cannot use Facebook API library in JavaFX, so you have to write your own Web services (Php files) to get and set data, interact with Facebook etc. (This part can be a life saver for you if you are determined to use JavaFX)</p>
<p>So to sum up, this is possible but don&#8217;t do it.</p>
<p>I personally mastered PHP and I am very happy with it, If I must use RIA in future I will definitely master Flash etc.</p>
<p>Don&#8217;t get me wrong, I like JavaFX, it&#8217;s great, language properties are really really charming, but it&#8217;s not really good for social applications</p>
]]></content:encoded>
			<wfw:commentRss>http://kaansoral.com/?feed=rss2&amp;p=243</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Lenovo Bluetooth Problem</title>
		<link>http://kaansoral.com/?p=241</link>
		<comments>http://kaansoral.com/?p=241#comments</comments>
		<pubDate>Sat, 02 Jan 2010 17:15:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bluetooth problem]]></category>
		<category><![CDATA[lenovo]]></category>
		<category><![CDATA[lenovo bluetooth]]></category>
		<category><![CDATA[lenovo bluetooth problem]]></category>
		<category><![CDATA[sl500 bluetooth]]></category>
		<category><![CDATA[windows 7]]></category>

		<guid isPermaLink="false">http://kaansoral.com/?p=241</guid>
		<description><![CDATA[Simply:
Press Fn+F5, if you see bluetooth there enable it.
else if you see a bluetooth device on Control Panel>Hardware on Network Devices tab, then play around with the driver etc, your problem is minor
else
This was my problem and it took me a lot of time to fix, on windows 7 with my current bios version blutooth [...]]]></description>
			<content:encoded><![CDATA[<p>Simply:<br />
Press Fn+F5, if you see bluetooth there enable it.<br />
else if you see a bluetooth device on Control Panel>Hardware on Network Devices tab, then play around with the driver etc, your problem is minor</p>
<p>else<br />
This was my problem and it took me a lot of time to fix, on windows 7 with my current bios version blutooth device wasn&#8217;t recognized, so I made a Bios update and it fixed the problem, now I have bluetooth enabled, here is the link:<br />
<a href="http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=BMOE-3VAM8Y">http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=BMOE-3VAM8Y</a></p>
]]></content:encoded>
			<wfw:commentRss>http://kaansoral.com/?feed=rss2&amp;p=241</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Netbeans ruins up the day, Windows 7 saves it</title>
		<link>http://kaansoral.com/?p=238</link>
		<comments>http://kaansoral.com/?p=238#comments</comments>
		<pubDate>Wed, 18 Nov 2009 05:28:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://kaansoral.com/?p=238</guid>
		<description><![CDATA[I have been using Netbeans PHP because it has auto-completion and it really speeds you up when you write PHP code,
Other than that you can&#8217;t believe how awful Netbeans PHP is, it sucks so hard because the FTP support is highly flawed
Suppose you work on a Project with another developer, he made a change, you [...]]]></description>
			<content:encoded><![CDATA[<p>I have been using Netbeans PHP because it has auto-completion and it really speeds you up when you write PHP code,</p>
<p>Other than that you can&#8217;t believe how awful Netbeans PHP is, it sucks so hard because the FTP support is highly flawed</p>
<p>Suppose you work on a Project with another developer, he made a change, you made a change, Netbeans overwrites the previous change, there is no version control</p>
<p>Suppose other developer created a new php file, in order to download it you have to download all the folder, if the folder doesnt exist you have to download all the Project!!</p>
<p>Additional to these, today (an hour ago) I deleted a folder in one of my projects, not realizing another folder was also selected in an other project<br />
This other folder is the Main Project Folder of a Facebook Application with 400k Monthly active users!!</p>
<p>Guess what? When i delete that other folder, my main application folder also got deleted and at the same time they are deleted from the FTP!! (Yes, i use On Save on Netbeans)</p>
<p>I immediately called my partner, asking him to restore the files if he had them, he uses Zend Studio so i was also afraid he didn&#8217;t have the files because Zend, unlike Netbeans works perfectly from FTP, so i wasn&#8217;t sure if Zend had the files, fortunately my partner had the files, but not the images</p>
<p>While we were talking, I right-clicked the mouse on My Project Folder, and I  saw an option named &#8220;Restore Previous Versions&#8221;, I didn&#8217;t even told Windows 7 to save back-ups, fortunately it did.</p>
<p>I restored files to 26 hours before the delete, thats the time when i last edited the files and thats it Netbeans fucked up the day and Windows 7 saved it.</p>
<p>It&#8217;s not the first time Windows helped me like this, there are occasions one of my External hard disks fails, Linux etc can&#8217;t do anything to open them, when i plug the hard disk to a windows, and on boot wait >6 hours, windows fixes the hard disk</p>
<p>Time after time, I love Windows.<br />
What about Linux? Well I hate linux because it consumes a high percentage of your time, because it needs to be tweaked and debugged a lot, so I have a Fedora 7 VM on VirtualBox, which I use for Linux specific stuff like C/C++ programming, other than that Windows is ideal</p>
]]></content:encoded>
			<wfw:commentRss>http://kaansoral.com/?feed=rss2&amp;p=238</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What to do when you get &#8220;This file is not SDC file or the format is not supported&#8221; from Unpacksdc</title>
		<link>http://kaansoral.com/?p=235</link>
		<comments>http://kaansoral.com/?p=235#comments</comments>
		<pubDate>Fri, 23 Oct 2009 08:40:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[en_windows_7_professional_x86_dvd_x15-65804]]></category>
		<category><![CDATA[This file is not SDC file or the format is not supported]]></category>
		<category><![CDATA[This file is not SDC file or the format is not supported solution]]></category>
		<category><![CDATA[windows 7 sdc]]></category>

		<guid isPermaLink="false">http://kaansoral.com/?p=235</guid>
		<description><![CDATA[Assume you are downloading Windows 7:


en_windows_7_professional_x86_dvd_x15-65804.01.sdc
en_windows_7_professional_x86_dvd_x15-65804.02.sdc

The unpacksdc can&#8217;t handle it, so just copy paste them to the C:\Temp\ (or wherever you download the Windows 7)
And resume the download from exe, it will continue from %90, and it will be less painful
]]></description>
			<content:encoded><![CDATA[<p>Assume you are downloading Windows 7:</p>
<pre class="brush: c; ">

en_windows_7_professional_x86_dvd_x15-65804.01.sdc
en_windows_7_professional_x86_dvd_x15-65804.02.sdc
</pre>
<p>The unpacksdc can&#8217;t handle it, so just copy paste them to the C:\Temp\ (or wherever you download the Windows 7)</p>
<p>And resume the download from exe, it will continue from %90, and it will be less painful</p>
]]></content:encoded>
			<wfw:commentRss>http://kaansoral.com/?feed=rss2&amp;p=235</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SPOJ MEOWIST</title>
		<link>http://kaansoral.com/?p=233</link>
		<comments>http://kaansoral.com/?p=233#comments</comments>
		<pubDate>Thu, 22 Oct 2009 20:25:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Algorithm]]></category>
		<category><![CDATA[SPOJ]]></category>
		<category><![CDATA[meowist]]></category>
		<category><![CDATA[spoj]]></category>
		<category><![CDATA[spoj meowist]]></category>

		<guid isPermaLink="false">http://kaansoral.com/?p=233</guid>
		<description><![CDATA[The Problem
This problem should be a practise problem
It took me 20mins to solve it =) , I am too rusted lately but hopefully I will post a new problem everyday from now on


#include&#60;stdio.h&#62;
#include&#60;stdlib.h&#62;
#include&#60;algorithm&#62;
#include&#60;string&#62;
#include&#60;iostream&#62;
#include&#60;set&#62;

using namespace std;

class person{
        public:
        int age;
   [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://www.spoj.pl/problems/MEOWIST/">The Problem</a><br />
This problem should be a practise problem</p>
<p>It took me 20mins to solve it =) , I am too rusted lately but hopefully I will post a new problem everyday from now on</p>
<pre class="brush: cpp; ">

#include&lt;stdio.h&gt;
#include&lt;stdlib.h&gt;
#include&lt;algorithm&gt;
#include&lt;string&gt;
#include&lt;iostream&gt;
#include&lt;set&gt;

using namespace std;

class person{
        public:
        int age;
        string name;
        person(int a,string b){age=a; name=b;}
};

bool operator&lt; (person a,person b)
{
        if(a.age&gt;b.age) return true;
        else if(a.age==b.age &amp;&amp; a.name&lt;b.name) return true;
       return false;
}

int main()
{

        string a;
        int b;
        multiset&lt; person &gt; people;
        while(cin&gt;&gt;a&gt;&gt;b)
        {
                person n(b,a);
                people.insert(n);
        }
        while(people.size())
        {
                cout&lt;&lt;people.begin()-&gt;name&lt;&lt;endl;
                people.erase(people.begin());
        }
        return 0;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://kaansoral.com/?feed=rss2&amp;p=233</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to put flash behind HTML</title>
		<link>http://kaansoral.com/?p=229</link>
		<comments>http://kaansoral.com/?p=229#comments</comments>
		<pubDate>Fri, 02 Oct 2009 10:52:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[facebook dialog flash]]></category>
		<category><![CDATA[Flash background]]></category>
		<category><![CDATA[html on flash]]></category>

		<guid isPermaLink="false">http://kaansoral.com/?p=229</guid>
		<description><![CDATA[This was a big issue for me because on my new game arcade Goober when i try to pop up a feed dialog, it was going behind the swf.
I found this post searching about how to keep the flash in the background, I may extract only the hiding part and post it here later.
EDIT:
It turns [...]]]></description>
			<content:encoded><![CDATA[<p>This was a big issue for me because on <a href="http://apps.facebook.com/gooober">my new game arcade Goober</a> when i try to pop up a feed dialog, it was going behind the swf.</p>
<p><a href="http://particletree.com/features/using-flash-as-an-animation-underlayer/">I found this post searching about how to keep the flash in the background</a>, I may extract only the hiding part and post it here later.</p>
<p>EDIT:</p>
<p>It turns out its a matter of flash embed properties, one should add</p>
<pre class="brush: js; ">

wmode=&#039;transparent&#039;
</pre>
<p>or adding this to object tag:</p>
<pre class="brush: js; ">

&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot; /&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://kaansoral.com/?feed=rss2&amp;p=229</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SPOJ Twinsnow solution</title>
		<link>http://kaansoral.com/?p=226</link>
		<comments>http://kaansoral.com/?p=226#comments</comments>
		<pubDate>Tue, 14 Jul 2009 19:38:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Algorithm]]></category>
		<category><![CDATA[Problems]]></category>
		<category><![CDATA[SPOJ]]></category>
		<category><![CDATA[snowflake]]></category>
		<category><![CDATA[SPOJ easy problem]]></category>
		<category><![CDATA[spoj problem]]></category>
		<category><![CDATA[spoj solution]]></category>
		<category><![CDATA[spoj twinsnow]]></category>

		<guid isPermaLink="false">http://kaansoral.com/?p=226</guid>
		<description><![CDATA[Started to code with a challenge, this problem turned out to be really simple
My friend tried out hashing and it timed out
My approach was to sort the 6 lengths, then sort all the snowflakes, and if the sorted parts match, it compares actual snowflakes
If snowflakes are equal, then when you sort their lengths the sorted [...]]]></description>
			<content:encoded><![CDATA[<p>Started to code with a challenge, this problem turned out to be really simple</p>
<p>My friend tried out hashing and it timed out</p>
<p>My approach was to sort the 6 lengths, then sort all the snowflakes, and if the sorted parts match, it compares actual snowflakes</p>
<p>If snowflakes are equal, then when you sort their lengths the sorted listes are also equal.<br />
If sorted lists are equal, then there is a possibility that snowflakes are equal.<br />
If sorted lists are not equal, snowflakes can&#8217;t be equal.</p>
<p>Here is the code:<br />
Passed in 11s</p>
<pre class="brush: c; ">

#include&lt;stdio.h&gt;
#include&lt;stdlib.h&gt;
#define DEBUG 0

int N;
struct node{
	int a[6],id;
};
node sorted[100100],unsorted[100100];

void escape()
{
	printf(&quot;Twin snowflakes found.\n&quot;);
	exit(0);
}

void issame(int aa,int b)
{
	if(DEBUG) printf(&quot;Comparing %d %d\n&quot;,aa,b);
	int i,k,ok;
	for(k=0;k&lt;6;k++)
	{
		ok=1;
		for(i=0;i&lt;6;i++)
			if(unsorted[aa].a[i]!=unsorted[b].a[(i+k)%6]) {ok=0; break;}
		if(ok) escape();
	}
	for(k=0;k&lt;6;k++)
	{
		ok=1;
		for(i=0;i&lt;6;i++)
			if(unsorted[aa].a[i]!=unsorted[b].a[(6-i+k)%6]) {ok=0; break;}
		if(ok) escape();
	}
}

int intsort(const void *pa,const void *pb)
{
	int *aa=(int *)pa;
	int *bb=(int *)pb;
	if((*aa)&gt;(*bb)) return -1;
	return 1;
}

int sort6(const void *pa,const void *pb)
{
	node *aa=(node *)pa;
	node *bb=(node *)pb;
	int i;
	for(i=0;i&lt;6;i++)
	{
		if((*aa).a[i]&gt;(*bb).a[i]) return 1;
		if((*aa).a[i]&lt;(*bb).a[i]) return -1;
	}
	return 0;
}

int equal(int aa,int b)
{
	for(int i=0;i&lt;6;i++)
		if(sorted[aa].a[i]!=sorted[b].a[i]) return 0;
	return 1;
}

void read(void)
{
	int i,j;
	scanf(&quot; %d&quot;,&amp;N);
	for(i=0;i&lt;N;i++)
	{
		for(j=0;j&lt;6;j++)
			scanf(&quot; %d&quot;,&amp;unsorted[i].a[j]),sorted[i].a[j]=unsorted[i].a[j],sorted[i].id=i;
		qsort(sorted[i].a,6,sizeof(int),intsort);
	}
	qsort(sorted,N,sizeof(node),sort6);
}

void find(void)
{
	int i=0,j,k,l;
	while(i&lt;N-1)
	{
		j=i+1;
		while(equal(i,j) &amp;&amp; j&lt;N) j++;
		for(k=i;k&lt;j-1;k++)
			for(l=k+1;l&lt;j;l++)
			{
				issame(unsorted[k].id,unsorted[l].id);
			}
		i=j;
	}
	printf(&quot;No two snowflakes are alike.\n&quot;);
}

int main()
{
	read();
	find();
	return 0;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://kaansoral.com/?feed=rss2&amp;p=226</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solution of * doesnt contain ObjectFactory.class or jaxb.index</title>
		<link>http://kaansoral.com/?p=224</link>
		<comments>http://kaansoral.com/?p=224#comments</comments>
		<pubDate>Mon, 13 Jul 2009 13:33:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[jaxb]]></category>
		<category><![CDATA[jaxb.index]]></category>
		<category><![CDATA[jaxb.index problem]]></category>

		<guid isPermaLink="false">http://kaansoral.com/?p=224</guid>
		<description><![CDATA[For some reason while unmarshalling something you get this error
Solution is:
Instead of


        javax.xml.bind.JAXBContext jaxbCtx = javax.xml.bind.JAXBContext.newInstance(&#34;oasis.names.specification.ubl.schema.xsd.invoice_2&#34;);
or
        JAXBContext context = JAXBContext.newInstance(inv.getClass().getPackage().getName());

Use a notation like this


        javax.xml.bind.JAXBContext jaxbCtx = javax.xml.bind.JAXBContext.newInstance(oasis.names.specification.ubl.schema.xsd.invoice_2.InvoiceType.class);

Where InvoiceType will be the thing you [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason while unmarshalling something you get this error<br />
Solution is:<br />
Instead of</p>
<pre class="brush: java; ">

        javax.xml.bind.JAXBContext jaxbCtx = javax.xml.bind.JAXBContext.newInstance(&quot;oasis.names.specification.ubl.schema.xsd.invoice_2&quot;);
or
        JAXBContext context = JAXBContext.newInstance(inv.getClass().getPackage().getName());
</pre>
<p>Use a notation like this</p>
<pre class="brush: java; ">

        javax.xml.bind.JAXBContext jaxbCtx = javax.xml.bind.JAXBContext.newInstance(oasis.names.specification.ubl.schema.xsd.invoice_2.InvoiceType.class);
</pre>
<p>Where InvoiceType will be the thing you want to unmarshall into</p>
]]></content:encoded>
			<wfw:commentRss>http://kaansoral.com/?feed=rss2&amp;p=224</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to validate XML with XSD in Java</title>
		<link>http://kaansoral.com/?p=213</link>
		<comments>http://kaansoral.com/?p=213#comments</comments>
		<pubDate>Fri, 10 Jul 2009 14:19:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[java xsd]]></category>
		<category><![CDATA[jaxb binding]]></category>
		<category><![CDATA[jaxb xsd]]></category>
		<category><![CDATA[xml xsd validate]]></category>

		<guid isPermaLink="false">http://kaansoral.com/?p=213</guid>
		<description><![CDATA[After initializing xsd with JAXB Binding on Netbeans, you can use a method like this.
Both JAXB binding and schema are same but as far as i see, JAXB unmarshalling doesn&#8217;t validate XML, it just transforms it.


package unmarshallertest;

import java.io.*;
import javax.xml.bind.*;
import javax.xml.validation.*;
import oasis.names.specification.ubl.schema.xsd.invoice_2.*;

public class Main {
    public static void main(String[] args) {
   [...]]]></description>
			<content:encoded><![CDATA[<p>After initializing xsd with JAXB Binding on Netbeans, you can use a method like this.<br />
Both JAXB binding and schema are same but as far as i see, JAXB unmarshalling doesn&#8217;t validate XML, it just transforms it.</p>
<pre class="brush: java; ">

package unmarshallertest;

import java.io.*;
import javax.xml.bind.*;
import javax.xml.validation.*;
import oasis.names.specification.ubl.schema.xsd.invoice_2.*;

public class Main {
    public static void main(String[] args) {
        String result;
        InvoiceType inv = new InvoiceType();
        try {
            javax.xml.bind.JAXBContext jaxbCtx = javax.xml.bind.JAXBContext.newInstance(&quot;oasis.names.specification.ubl.schema.xsd.invoice_2&quot;);
            javax.xml.bind.Unmarshaller unmarshaller = jaxbCtx.createUnmarshaller();

            SchemaFactory sf = SchemaFactory.newInstance(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI);
            Schema schema = sf.newSchema(new File(&quot;C:\\Users\\Kaan\\Desktop\\BELGELER\\UBL-TR files\\UBLTR\\UBL-TR\\xsd\\maindoc\\UBLTR-Invoice-2.0.xsd&quot;));

            unmarshaller.setSchema(schema);

            JAXBElement element=(JAXBElement) unmarshaller.unmarshal(new FileInputStream(&quot;fatura.xml&quot;)); //NOI18N
            inv=(InvoiceType) element.getValue();
        } catch (Exception ex) {
            // XXXTODO Handle exception
            ex.printStackTrace();
        }
        System.out.println(&quot;Validation complete&quot;);

    }
}
</pre>
<p>for oasis.names.specification.ubl.schema.xsd.invoice_2.InvoiceType code is as seen<br />
you can fill it for your own xml and package</p>
<p>Netbeans jaxbu(tab) shortcode doesnt work as intended (At least not now)</p>
]]></content:encoded>
			<wfw:commentRss>http://kaansoral.com/?feed=rss2&amp;p=213</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
