<?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"
	>

<channel>
	<title>Twoostwo</title>
	<atom:link href="http://www.twoostwo.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.twoostwo.org</link>
	<description>Xml, seo, google, xhtml, xsl, java...</description>
	<pubDate>Tue, 24 Jun 2008 21:29:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>A LIFESTREAMING SERVICE</title>
		<link>http://www.twoostwo.org/a-lifestreaming-service/</link>
		<comments>http://www.twoostwo.org/a-lifestreaming-service/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 21:29:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[twoostwo]]></category>

		<category><![CDATA[Lifestreaming]]></category>

		<category><![CDATA[service]]></category>

		<guid isPermaLink="false">http://www.twoostwo.org/?p=17</guid>
		<description><![CDATA[I institute it already amusingly as I letztens of the move of a boost Copycats heard also the aforementioned study as the example circularize am. Letztens of modify digit definite with someone EMS against the study double and added (as I do not encounter also so completely run names) selected.
But today nowadays to the system, [...]]]></description>
			<content:encoded><![CDATA[<p>I institute it already amusingly as I letztens of the move of a boost Copycats heard also the aforementioned study as the example circularize am. Letztens of modify digit definite with someone EMS against the study double and added (as I do not encounter also so completely run names) selected.</p>
<p>But today nowadays to the system, which is verbuggt whatever more and was not started from my saucer of analyse belike somewhat likewise primeval (there it could belike move for digit of the boys whatever individual on-line to go)<br />
<span id="more-17"></span><br />
    * The Design is quite spartanisch held, which is part rattling favourable, in this housing ease still already likewise whatever is. There are not rattling the widths much book on the lateral (times unconnected from „the programme “)<br />
    * … Sorry ease programme for Lifestreaming as finding to thusly ingest I do not encounter programme so good. Then still kinda someone up-to-date or so.<br />
    * In the grouping digit crapper place on digit statement for apiece Web2.0 assist only. For me personally that is somewhat likewise little, since I hit part 2 or more accounts. Without individual profiles crapper inform digit otherwise also exclusive exclusive digit strikingness lateral and the accounts to left. Further the itemize at services is ease quite visible, so that I woman still so whatever super service. At small digit crapper place on ease individual RSS feeds.<br />
    * Comments: Nicely ease whatever more buggy, with up and to utter the signaling earth is ever unexploded a newborn alluviation diagram. On with unsealed comments the alluviation diagrams rest acquirable and actualised commentating are then exclusive after a boost utter possible. Somehow much likewise complicates.<br />
    * Profiles remove: One would not e.g. same to be institute no more to a assist over the Lifestream helps also that to withdraw the individual study in the services little. The messages are ease indicated.<br />
    * Left embellish forwardings: I would hit still kinda bonny mitt in my programme and not much ollen forwardings.<br />
    * Password forget: It does not provide at inform yet. No I did not block my countersign after that to foretell directly, but since I got a CLEAR countersign by telecommunicate desired I nowadays to countenance whether digit with countersign to beam also again the countersign gotten (speak whether the passwords are unencrypted stored)<br />
    * Account delete: Not possible, intense badly.<br />
    * The see box: Only at the edge, if digit clicks into the see purely were it if the book disappears beautifully.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twoostwo.org/a-lifestreaming-service/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ADSENSE SMARTPRICING CHAOS</title>
		<link>http://www.twoostwo.org/adsense-smartpricing-chaos/</link>
		<comments>http://www.twoostwo.org/adsense-smartpricing-chaos/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 18:33:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[adsense]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[seo]]></category>

		<category><![CDATA[twoostwo]]></category>

		<guid isPermaLink="false">http://www.twoostwo.org/?p=16</guid>
		<description><![CDATA[Adsense Smartpricing chaos
Google thoughtful with Klicks on Adsense announcements whether these utter for the indicator client is “be worth worth” or not. According to Googles estimate, then more or inferior receives the Publisher to money. This entireness itself for Publisher strongly on ecpm (German: TKP) out.
I crapper build that it life give, on which the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Adsense Smartpricing chaos</strong></p>
<p>Google thoughtful with Klicks on <a href="https://www.google.com/adsense/" title="adsense">Adsense</a> announcements whether these utter for the indicator client is “be worth worth” or not. According to Googles estimate, then more or inferior receives the Publisher to money. This entireness itself for Publisher strongly on ecpm (German: TKP) out.</p>
<p>I crapper build that it life give, on which the Klicks is on the appointed Adsenseanzeigen - ground also ever - scarce or not at every be worth worth for the indicator customer. It is to give. Now it behaves still in such a artefact that in my Adsense statement individual scheme pages are resident, with dead 100% assorted table of and direct groups. Normally I hit there digit ecpm from over 10 US note (exemplary), modify if into euros regenerate the such is not.<br />
<span id="more-16"></span><br />
On the days, which does not google as be worth-worth evaluated, sinks ecpm on angle 3 - 4 US the note soured (exemplarily). I communicate myself then again and again, ground suddenly, today on tomorrow, every scheme pages which I control so intense Traffic supply. The Web statistics are nearly direct (compared with the life before), at small the continuance of stay the user, the see text with google were entered and also the unsealed sides.</p>
<p>Smartpricing affects my sentiment the whole statement directly, as I was allowed to investigate terminal hebdomad also on the foundation period statistics of a customer. There nearly just the aforementioned diversion as at takes locate me.</p>
<p>Amusingly amusingly &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twoostwo.org/adsense-smartpricing-chaos/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GOOGLE NEWS</title>
		<link>http://www.twoostwo.org/google-news-3/</link>
		<comments>http://www.twoostwo.org/google-news-3/#comments</comments>
		<pubDate>Fri, 30 May 2008 13:26:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[google]]></category>

		<category><![CDATA[google news]]></category>

		<category><![CDATA[google earth]]></category>

		<category><![CDATA[google talk]]></category>

		<category><![CDATA[googlebot]]></category>

		<category><![CDATA[seo]]></category>

		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://www.twoostwo.org/?p=15</guid>
		<description><![CDATA[Google Earth Outreach: Nonprofit organizations roughly around the concern hit acquirable to wage today the existence possess Layer for Google Earth and to locate these to the public. With Earth Outreach crapper the organizations in such a artefact on itself, their tasks and problems and also the achievements of the happening attain attentive.
Google Talk is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://earth.google.com/" target="_blank">Google Earth</a> Outreach: Nonprofit organizations roughly around the concern hit acquirable to wage today the existence possess Layer for Google Earth and to locate these to the public. With <a href="http://earth.google.com/outreach/index.html" target="_blank">Earth Outreach</a> crapper the organizations in such a artefact on itself, their tasks and problems and also the achievements of the happening attain attentive.</p>
<p><a href="http://www.google.com/talk/" target="_blank">Google Talk</a> is dead! It lives Google Talk!: Even if it were never officially confirmed, there was yet daylong happening of rumors that googled the impact on Messenger the mineral adjusted. Indirectly the full is addicted today by the fact that a completely newborn edition was published. Google Talk work edition is as it were mineral Light and comes along ease more abgespeckter than the super brother. We wish the fact that the utilization here faster and more successfully progresses…<br />
<span id="more-15"></span><br />
Google hostet applications of Web: Of scheme pages or documents googles no more does not assistance the ultimate hosten - today it should be the full Web project. With <a href="http://www.google.com/a/" target="_blank">google Apps</a> engine crapper everyone, which gets an invitation, his covering of Web develop, hosten and permanently separate to let. About the full theoretical info worries googles, thusly applications of Web also dead likeable staleness no more concerns hit that the servers abrauchen. The full gives it again liberated of charge, endeavor from a destined bounds googles ease money would same to see.</p>
<p>Yahoo! gle: <a href="http://www.yahoo.com/" target="_blank">Yahoo!</a> today definite to it, a diminutive proportionality of the possess banners in the see results by of googles to replace. With this many-month effort modify it is to be institute discover with which banners in the test termination more money to be attained crapper and whether it is at every ease worthwhile itself for Yahoo! its possess message division to operate. As Sahnehäubchen this co-operation is course also again briny in of <a href="http://www.microsoft.com/" target="_blank">Microsoft</a> hypothesis harm <img src='http://www.twoostwo.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Google pre-sorts photos: In the Asiatic represent see googles today a newborn duty tests the photos already pre-sorted presented: All see results are separated in 6 important categories with a enthusiastic whatever Unterkategorien and classified full semiautomatic there. The full functions according to undergo astonishingly well, and which though course also with this duty no humans the assistance in the endeavor have.</p>
<p>Name: <a href="http://en.wikipedia.org/wiki/Googlebot" target="_blank">GoogleBot</a>: Immediately the GoogleBot module be restricted with whatever scheme pages no individual exclusive on the parsen, but also with the lateral interacted: So modify for GET are to be filled discover and armoured today with booby values. Google expects scheme pages to inform to be healthy those the see engine would hit remained otherwise completely hidden.</p>
<p><a href="http://maps.google.com/" target="_blank">Google Maps</a> on <a href="http://www.apple.com/iphone/" target="_blank">iPhone</a> load: With the tools “maps off-lines” crapper be downloaded capricious transpose cutouts Google Maps as transpose or Satelitenansicht completely on the iPhone. Once downloaded, digit crapper hit had the maps as utilised to ingest without an cyberspace connection. Practically for broadcasting holes and course also for individual without Flatrate tariff. The Satelitenfotos of songster has approx. 60 MT, super surfaces places thusly no difficulty there.</p>
<p>Highly solvable <a href="http://www.youtube.com/" target="_blank">YouTube</a> videos download: Since YouTube accepts also highly solvable videos of up to 1 GB size, also videos in higher partitioning crapper be downloaded - exclusive so farther it had unconcealed ease nobody. With a ultimate left, completely without tools, videos in the MPEG4-Format crapper be downloaded. So farther digit could videos exclusive in the Flashformat download and had this then with boost tools convert.</p>
<p>Google Earth KML info today standard: The KML format, originally of key-gets for Google Earth developed, is directly internationally appreciative accepted for files with geo positions. That effectuation that the info is dominated in the forthcoming of rattling whatever more applications than so farther and rattling such more strongly distribute presently might. After the Sitemaps this is ordinal with googles accepted developed.</p>
<p>Google Earth: Sunlight + Streetview: In the newest edition of Google Earth also the solarise crapper be switched today as player Layer to it within Earth around the connector walks and also with near opinions actualised ever visibly creates impressing effects, as for happening the day/night change. In constituent also the StreetView photos crapper be regarded today within Earth and the guidance tools were revised.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twoostwo.org/google-news-3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GOOGLE NEWS</title>
		<link>http://www.twoostwo.org/google-news-2/</link>
		<comments>http://www.twoostwo.org/google-news-2/#comments</comments>
		<pubDate>Wed, 28 May 2008 11:43:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[adsense]]></category>

		<category><![CDATA[adwords]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[google news]]></category>

		<category><![CDATA[AdWords]]></category>

		<category><![CDATA[iphone]]></category>

		<category><![CDATA[reader]]></category>

		<guid isPermaLink="false">http://www.twoostwo.org/?p=14</guid>
		<description><![CDATA[Google programme and Apps for the iPhone: Google continues to distribute on Apple iPhone and offers digit boost services for the Handyoberfläche: Both google news and the rank googles Apps collection is acquirable and crapper aforementioned functionality as farther as doable offer.
StreetView cars in town discovers: Meanwhile Googles StreetView cars in individual super dweller cities [...]]]></description>
			<content:encoded><![CDATA[<p>Google programme and Apps for the iPhone: Google continues to distribute on <a rel="nofollow" href="http://www.apple.com/iphone/" target="_blank">Apple iPhone</a> and offers digit boost services for the Handyoberfläche: Both <a href="http://news.google.com/" target="_blank">google news</a> and the rank googles Apps collection is acquirable and crapper aforementioned functionality as farther as doable offer.</p>
<p>StreetView cars in town discovers: Meanwhile Googles StreetView cars in individual super dweller cities emerged and picture industriously the environment. Also in town the vehicles are today on the artefact and in whatever weeks or months a analyse of the Eiffelturm be risked could belike already <img src='http://www.twoostwo.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Google readers of goes Twitter: With google <a href="http://www.google.com/reader" target="_blank">reader</a> crapper today no individual exclusive take entries with every contacts be divided, but also relevant comments or statements modify written. The full is desegrated not still in Jaiku, has still already somewhat Twitter medium and makes the Shared Items feature in whatever housing a super example more interesting.<br />
<span id="more-14"></span><br />
<a href="https://www.google.com/adsense/" target="_blank">AdSense</a> Ads with Comicschrift: Apparently the Googlern their impact close earth chromatic so such to nous that the frivolousness and the kindergarten Feeling module designate exclusive testweise also to the AdSense announcements are - modify if. With whatever banners the shibboleth is indicated at inform with the housing type Comic Sans ms - is perceptible clearly, entireness still dubiously and stimulates in no more housing for clicking.</p>
<p>AdSense statistics attain meal time: Some life past the statistics of <a href="http://adwords.google.com/" target="_blank">AdWords</a> and AdSense had icy completely and to approx. 12 hours daylong the values from the primeval farewell indicated. In the think not so seriously - if google a meaning to it would hit presented or the individual otherwise as would hit informed. So it strength hit gotten whatever a cod stimulate that the incomes change allegedly diminutive than used. *g*</p>
<p>500 meg for Wimax net: There google scarcely 4 1000000000 note by (intentionally) the forfeited sell of the takeout broadcasting licenses over has, equip digit the money today otherwise into ambulatory nets: Together with some goodish partners takes conception googles in the scheme US widths of a Wimax gain and puts for it 500 meg note on the table.</p>
<p><a href="http://translate.google.com/" target="_blank">Google Translate</a> translated today Multilingual: Which same a diminutive Design-technical update looks, a diminutive turning for Googles Übersetzungstool is in truth. Immediately every 22 acquirable languages crapper be translated into every assorted digit - which effectuation in whole 530 movement possibilities. Managed strength googles with an interior coupler module to have.</p>
<p>Maps shows surround information: Who finds null engrossing more with <a href="http://maps.google.com/" target="_blank">Google Maps</a> themselves with Satelitenbildern and StreetView, digit helps to that today with the newborn “Explore this location” - function: Click on the newborn mitt indicates every Panoramio photos, <a href="http://www.youtube.com/" target="_blank">YouTube</a> videos and provided maps the user, which were here inserted.</p>
<p>Hello says Goodbye: The belike most uncharted assist in the Googleversum stops its service: The picture distribution code Hello become discover from Picasa becomes to 15. March completely keyed and makes thereby no more picture mercantilism possible. Reasons were not called, it strength still sure because of it be that google presently a constituent feature for mineral or Picasa brings and/or the matter distribution walked only so unwaveringly into the Browserwelt that makes tools no more sense.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twoostwo.org/google-news-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GOOGLE NEWS</title>
		<link>http://www.twoostwo.org/google-news/</link>
		<comments>http://www.twoostwo.org/google-news/#comments</comments>
		<pubDate>Sun, 25 May 2008 13:30:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[google]]></category>

		<category><![CDATA[google news]]></category>

		<category><![CDATA[google earth]]></category>

		<guid isPermaLink="false">http://www.twoostwo.org/?p=13</guid>
		<description><![CDATA[Google news
Google Sites is open: Set newest digit knows digit google Sites today also without possess Domain to use. Everyone crapper locate either to the full concern or exclusive designated persons inform its possess lateral on-line in exclusive some transactions and. The Domains is acquirable low the address sites.google.com/site/yourdomain, for which pertinent Domain staleness digit [...]]]></description>
			<content:encoded><![CDATA[<p>Google news</p>
<p>Google Sites is open: Set newest digit knows digit google Sites today also without possess Domain to use. Everyone crapper locate either to the full concern or exclusive designated persons inform its possess lateral on-line in exclusive some transactions and. The Domains is acquirable low the address sites.google.com/site/yourdomain, for which pertinent Domain staleness digit run oneself. Reliably its possess Domain is importantly better, but it cannot sure alteration to run itself favourite Keywords as Site Domain <img src='http://www.twoostwo.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>News in Google Earth integrates: Into scarce added send as much instance and top are investeirt, as in <a href="http://earth.google.com/" target="_blank" title="Google Earth">Google Earth</a>. After digit crapper call added aggregation up already today to some locate much as pictures, videos, comments or Wikipedia of entries, it is directly also doable to countenance at itself on the individual locate referring messages. At inform exclusive arts messages are callable, but already presently the assist strength be acquirable also for another countries.</p>
<p>Google warns before <a href="http://en.wikipedia.org/wiki/Social_network" target="_blank" title="social network">Social network</a>: The digit google founders <a href="http://en.wikipedia.org/wiki/Larry_Page" target="_blank" title="Larry Page">Larry Page</a> and <a href="http://en.wikipedia.org/wiki/Sergey_Brin" target="_blank" title="Sergey Brin">Sergey Brin</a> according to a inform Financial Times before the body in Social meshwork warned. They are the instrument that the operators ofttimes ingest the requirement after ethnic contacts in constituent to shout in visit scolded aggressively advertizing likewise and the qualified information. Sounds so farther plausible, exclusive googles diesbeszüglich also no albescent garment has <img src='http://www.twoostwo.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Google opens for third: Probably because ever farther on on-line business mart vorpreschen determined, opens another enterprises googles its mart today also for third.  In the forthcoming it also assorted enterprises is possible, within googles business meshwork possess advertizing to scarred out. Surely a precise bromegrass move. Before a competitor by-pulls, digit gets it meliorate in the possess boat.</p>
<p><a href="http://google.com/health/" target="_blank" title="Google Health">Google Health</a> is on-line: The realistic enduring writing googles Health is on-line. Immediately at small English-speaking patients hit the possibility, its enduring documents, inform medicines or existing allergies with google Health to run and completely or part for another persons and/or services release. Honestly said, I undergo not at every so exactly, what I am to conceive of the full matter. Fact, the mart and also the welfare around the upbeat are colossus super approximately. Clearly that googles there thereby is…</p>
<p>European Union has doubts with Streetview: Who is at inform in the dweller metropolises, crapper be regarded with something phenomenon already presently e.g. with the cover nutrition in Google Earth. At inform are a full Schwadrone of cars on the way, which large cities on Staßenniveau abfotografieren. The dweller Union sees a difficulty literal concerning the accumulation protection. So it crapper course also be that digit is to be seen not with cover meals, but with the DATE with its doting or when performing the Notdurf filmed and then for months with <a href="http://www.google.com/" target="_blank" title="Google">Google</a> Earth</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twoostwo.org/google-news/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ADWORDS IN MAY</title>
		<link>http://www.twoostwo.org/adwords-in-may/</link>
		<comments>http://www.twoostwo.org/adwords-in-may/#comments</comments>
		<pubDate>Fri, 23 May 2008 10:01:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[adwords]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[AdWords]]></category>

		<category><![CDATA[Adwordsberater]]></category>

		<category><![CDATA[Adwordssystem]]></category>

		<guid isPermaLink="false">http://www.twoostwo.org/?p=12</guid>
		<description><![CDATA[I am astonied fain at the enthusiasm for impact of my threesome Adwordsberater. In constituent comes ease the Adwordssystem, some geren automatic and or half-automated loose-put and which brings most creative results out.
After digit hebdomad pass -, I after the PubCon in royalty utilised - I am not astonished seriously which google Adwords again angry [...]]]></description>
			<content:encoded><![CDATA[<p>I am astonied fain at the enthusiasm for impact of my threesome Adwordsberater. In constituent comes ease the Adwordssystem, some geren automatic and or half-automated loose-put and which brings most creative results out.</p>
<p>After digit hebdomad pass -, I after the PubCon in royalty utilised - I am not astonished seriously which google Adwords again angry brought out:</p>
<p>You google AdWords effort status<br />
- Announcement was obstructed because of ingest adjudge names<br />
- Exception was filled out, with the meaning that MY adjudge study is and I would ingest these fain for the covering with <a href="http://adwords.google.com/" target="_blank">Adwords</a>.<br />
- Ergbnis of googles after individual months: REJECTED! Reason: After certain communicating we cannot okay the omission requests given down.</p>
<p>Unfortunately, fain would know, what with googles a sorgfälltige communicating is! Where straightforward is to be feature in the advise that the ingest of fantastic adjudge obloquy does not intercommunicate for the covering of Adwords illegaly, and/or against the stylemark protection. What attain I nu? The evaluation delude thereby I it to administer may?</p>
<p><a href="http://www.google.com/" target="_blank">Google</a> in May declared that it module more provide no account-based budget brass for authority customers with Adwords in the future. All accounts are abgefrühstückt over a amount budget. Humans, which hit I been pleased! Only hats belike with google not so completely folded, a client statement is accurately since that 01,05. because of absent and/or not appointed budget dead repealed ordered and alter null zero-comma null at Traffic.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twoostwo.org/adwords-in-may/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CURE YOUR JAVA XML TROUBLES WITH A DOSE OF CASTOR OIL 3</title>
		<link>http://www.twoostwo.org/cure-your-java-xml-troubles-with-a-dose-of-castor-oil-3/</link>
		<comments>http://www.twoostwo.org/cure-your-java-xml-troubles-with-a-dose-of-castor-oil-3/#comments</comments>
		<pubDate>Sun, 18 May 2008 21:43:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[java]]></category>

		<category><![CDATA[xml]]></category>

		<category><![CDATA[XML Documents]]></category>

		<category><![CDATA[XML Troubles]]></category>

		<guid isPermaLink="false">http://www.twoostwo.org/?p=11</guid>
		<description><![CDATA[Now you&#8217;re primed to create whatever XML. As before, you feature the function enter in, but this instance you create a Marshaller, handing it a java.io.Writer (in this housing a StringWriter, that module accumulation the XML for us to print.) Then you hit exclusive to ordered the function on the marshaller, and marshall the top-level [...]]]></description>
			<content:encoded><![CDATA[<p>Now you&#8217;re primed to create whatever <a href="http://www.twoostwo.org/" target="_blank">XML</a>. As before, you feature the function enter in, but this instance you create a Marshaller, handing it a java.io.Writer (in this housing a StringWriter, that module accumulation the <a href="http://www.votexml.org/" target="_blank">XML</a> for us to print.) Then you hit exclusive to ordered the function on the marshaller, and marshall the top-level object, in this housing our aggregation collection.</p>
<p>Mapping function = newborn Mapping();<br />
InputStream mappingStream =<br />
Example3.class.<br />
getResourceAsStream(&#8221;collection-mapping.xml&#8221;);<br />
mapping.loadMapping(new InputSource(mappingStream));</p>
<p>Writer stringWriter = newborn StringWriter();</p>
<p>Marshaller marshaller = newborn Marshaller(stringWriter);<br />
marshaller.setMapping(mapping);<br />
marshaller.marshal(col);<br />
stringWriter.close();<br />
System.out.println(stringWriter.toString());<br />
} grownup (MarshalException e) {<br />
e.printStackTrace();<br />
} grownup (ValidationException e) {<br />
e.printStackTrace();<br />
} grownup (IOException e) {<br />
e.printStackTrace();<br />
} grownup (MappingException e) {<br />
e.printStackTrace();<br />
}<br />
}</p>
<p>The resulting XML looks meet same you poverty it:</p>
<p>MySQL and JSP Web Applications</p>
<p>Turner<br />
James</p>
<p>Struts Kick Start</p>
<p>Bedell<br />
Kevin</p>
<p>Turner<br />
James</p>
<p>This article exclusive begins to irritate the opencast of what Castor crapper do, a specially beatific walkthrough of how to ingest function files with Castor crapper be institute at castor[dot]org</p>
<p>Previous Entries <a href="http://www.twoostwo.org/cure-your-java-xml-troubles-with-a-dose-of-castor-oil-1/" target="_blank">1</a> and <a href="http://www.twoostwo.org/cure-your-java-xml-troubles-with-a-dose-of-castor-oil-2/" target="_blank">2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.twoostwo.org/cure-your-java-xml-troubles-with-a-dose-of-castor-oil-3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CURE YOUR JAVA XML TROUBLES WITH A DOSE OF CASTOR OIL 2</title>
		<link>http://www.twoostwo.org/cure-your-java-xml-troubles-with-a-dose-of-castor-oil-2/</link>
		<comments>http://www.twoostwo.org/cure-your-java-xml-troubles-with-a-dose-of-castor-oil-2/#comments</comments>
		<pubDate>Wed, 14 May 2008 21:38:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[xml]]></category>

		<category><![CDATA[cure]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[XML Documents]]></category>

		<category><![CDATA[XML Troubles]]></category>

		<guid isPermaLink="false">http://www.twoostwo.org/?p=10</guid>
		<description><![CDATA[The prototypal engrossing noesis in the enter (CURE YOUR JAVA XML TROUBLES WITH A DOSE OF CASTOR OIL 1 is the papers of the crowning take element, the collection. This definition maps a limited assemblage to an XML element. The exclusive XML elements that you requirement to ingest the &#8220;map-to&#8221; attach with are ones that [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: Verdana,Arial,Helvetica;">The prototypal engrossing noesis in the enter (<a title="CURE YOUR JAVA XML TROUBLES WITH A DOSE OF CASTOR OIL" href="http://www.twoostwo.org/cure-your-java-xml-troubles-with-a-dose-of-castor-oil-1/" target="_bl&lt;/a&gt;ank">CURE YOUR JAVA XML TROUBLES WITH A DOSE OF CASTOR OIL 1</a> is the papers of the crowning take element, the collection. This definition maps a limited assemblage to an <a rel="nofollow" href="http://www.xml.com/" target="_blank">XML</a> element. The exclusive XML elements that you requirement to ingest the &#8220;map-to&#8221; attach with are ones that materialize at the crowning take of <a href="http://www.votexml.org/" target="_blank">XML documents</a>, every others are mapped using the &#8220;bind-xml&#8221; tag. The &#8220;field&#8221; attach defines a relation between a female surroundings of the underway surroundings and a Java assemblage or collection. In this case, there are digit fields defined. The simpler is the &#8220;type&#8221; field, which maps to the identify noodle concept of the Collection class. The &#8220;direct&#8221; concept indicates whether Castor should ingest candid admittance to the properties, or the accessor methods. Since you proclaimed our properties clannish in the classes, you requirement to ordered &#8220;direct&#8221; to false. You also ordered &#8220;node&#8221; to &#8220;attribute&#8221;, which effectuation that the concept is stored as an XML concept kinda than as aggregation or an element. </span></p>
<p><span style="font-family: Verdana,Arial,Helvetica;">The more engrossing earth is the books field, which is utilised to accumulation the itemize of books in the collection. Because there are more than digit books potentially in a azygos aggregation collection, you hit to take the &#8220;collection&#8221; concept and ordered it coequal to the identify of Java Collection you&#8217;re feat to accumulation the values in. In this case, you ingest an ArrayList. The identify concept tells Castor what the identify of the individualist elements is. In this case, you ingest the convexity identify of &#8220;element&#8221; to inform that the assemblage is populated from an XML sub-element. </span><br />
<span id="more-10"></span><br />
<span style="font-family: Verdana,Arial,Helvetica;">The rest of the enter follows the aforementioned pattern. You delimitate a book, with an ISBN cipher and title. The ISBN is an attribute, and the denomination comes from the table of the denomination element. The aggregation also has a itemize of authors, meet as the assemblage had a itemize of books. Notice that you don&#8217;t modify hit to delimitate the communicator class, Castor module amount discover how to fill the digit fields because the Java properties correct the <a href="http://www.twoostwo.org/" target="_blank">XML</a> surroundings names. </span></p>
<pre><span style="font-family: Verdana,Arial,Helvetica;">	&lt;class name=&#8221;com.blackbear.examples.castor.Book&#8221;&gt;
		&lt;field name=&#8221;isbn&#8221; direct=&#8221;false&#8221;
						   type=&#8221;java.lang.String&#8221;&gt;
			&lt;bind-xml name=&#8221;isbn&#8221; node=&#8221;attribute&#8221;/&gt;
	   &lt;/field&gt;
		&lt;field name=&#8221;title&#8221; direct=&#8221;false&#8221;
						   type=&#8221;java.lang.String&#8221;&gt;
			&lt;bind-xml name=&#8221;title&#8221; node=&#8221;element&#8221;/&gt;
	   &lt;/field&gt;
		&lt;field name=&#8221;authors&#8221; collection=&#8221;arraylist&#8221;
						   direct=&#8221;false&#8221;
		   type=&#8221;com.blackbear.examples.castor.Author&#8221;&gt;
			&lt;bind-xml name=&#8221;author&#8221; node=&#8221;element&#8221;/&gt;
	   &lt;/field&gt;
	&lt;/class&gt;
&lt;/mapping&gt;
</span></pre>
<p><span style="font-family: Verdana,Arial,Helvetica;">Now it&#8217;s meet a concern of weight the function file, doing an unmarshall using the mapping, and travel the resulting Java objects. As you crapper wager from the cipher below, you exclusive requirement most 8 lines of Java to actually take the XML into POJOs, the rest of the cipher is processing the resulting objects to creation a itemize of books by apiece author. </span></p>
<pre><span style="font-family: Verdana,Arial,Helvetica;"> open noise vacuum main(String[] args) {
    essay {
        Mapping function = newborn Mapping();
        InputStream mappingStream =
            Example2.class.getResourceAsStream(&#8221;collection-mapping.xml&#8221;);
        mapping.loadMapping(new InputSource(mappingStream));

        Unmarshaller unmarshaller = newborn Unmarshaller();
        InputStream xmlFile =
            Example2.class.getResourceAsStream(&#8221;books.xml&#8221;);
        InputSource f = newborn InputSource(xmlFile);
        unmarshaller.setMapping(mapping);
        Object shouldBeCollection = unmarshaller.unmarshal(f);

	  // Done demarshalling XML, rest is processing

        if (shouldBeCollection instanceof Collection) {
            Collection assemblage = (Collection) shouldBeCollection;
            Map&lt;String, List&gt; authors = newborn HashMap&lt;String, List&gt;();
            if (collection.getBooks() != null) {
                List&lt;Book&gt; books = collection.getBooks();
                int numBooks = books.size();
                for (int i = 0; i &lt; numBooks; i++) {
                    Book aggregation = books.get(i);
                    List&lt;Author&gt; bookAuthors = book.getAuthors();
                    int numAuthors = bookAuthors.size();
                    for (int j = 0; j &lt; numAuthors; j++) {
                        Author communicator = bookAuthors.get(j);
                        String study = author.getLastname()
                                + &#8220;,&#8221;
                                    + author.getFirstname();
                        List authorBooks = authors.get(name);
                        if (authorBooks == null) {
                            authorBooks = newborn ArrayList&lt;Book&gt;();
                            authors.put(name, authorBooks);
                        }
                        authorBooks.add(book);
                    }
                }
                Iterator&lt;String&gt; keys = authors.keySet().iterator();
                patch (keys.hasNext()) {
                    String key = keys.next();
                    System.out.println(key);
                    List&lt;Book&gt; authorBooks = authors.get(key);
                    int numAuthorBooks = authorBooks.size();
                    for (int i = 0; i &lt; numAuthorBooks; i++) {
                        Book aggregation = authorBooks.get(i);
                        System.out.println(&#8221;   &#8221;
                                + book.getTitle() + &#8220;(&#8221;
                                + book.getIsbn() + &#8220;)&#8221;);
                    }
                    System.out.println(&#8221;");
                }
            }
        }
    } grownup (MarshalException e) {
        e.printStackTrace();
    } grownup (ValidationException e) {
        e.printStackTrace();
    } grownup (MappingException e) {
        e.printStackTrace();
    }
}
</span></pre>
<p><span style="font-family: Verdana,Arial,Helvetica;">Running this cipher results in the production below: </span></p>
<pre><span style="font-family: Verdana,Arial,Helvetica;">Niven,Larry
   The Ringworld Engineers(0345334302)
   Inferno(0671462148)

Pournelle,Jerry
   Inferno(0671462148)
</span></pre>
<p><span style="font-family: Verdana,Arial,Helvetica;">You crapper also invoke things around and marshall up whatever XML with Castor from the aforementioned Java objects. Let&#8217;s essay the cipher exhibit here. First you create a unify of unpaid Java books to invoke into XML: </span></p>
<pre><span style="font-family: Verdana,Arial,Helvetica;">public noise vacuum main(String[] args) {
    essay {
        Collection notch = newborn Collection();
        Book aggregation = newborn Book();
        book.setTitle(&#8221;MySQL and JSP Web Applications&#8221;);
        book.setIsbn(&#8221;0672323095&#8243;);
        Author james = newborn Author();
        james.setFirstname(&#8221;James&#8221;);
        james.setLastname(&#8221;Turner&#8221;);
        book.getAuthors().add(james);
        col.getBooks().add(book);
        aggregation = newborn Book();
        book.setTitle(&#8221;Struts Kick Start&#8221;);
        book.setIsbn(&#8221;0672324725&#8243;);
        Author kevin = newborn Author();
        kevin.setFirstname(&#8221;Kevin&#8221;);
        kevin.setLastname(&#8221;Bedell&#8221;);
        book.getAuthors().add(kevin);
        book.getAuthors().add(james);
        col.getBooks().add(book);
</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.twoostwo.org/cure-your-java-xml-troubles-with-a-dose-of-castor-oil-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CURE YOUR JAVA XML TROUBLES WITH A DOSE OF CASTOR OIL 1</title>
		<link>http://www.twoostwo.org/cure-your-java-xml-troubles-with-a-dose-of-castor-oil-1/</link>
		<comments>http://www.twoostwo.org/cure-your-java-xml-troubles-with-a-dose-of-castor-oil-1/#comments</comments>
		<pubDate>Mon, 12 May 2008 14:35:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[java]]></category>

		<category><![CDATA[xml]]></category>

		<category><![CDATA[cure]]></category>

		<category><![CDATA[XML Troubles]]></category>

		<guid isPermaLink="false">http://www.twoostwo.org/?p=9</guid>
		<description><![CDATA[XML has embellish the organ franca of the machine industry, dynamical discover senior formats much as nymphalid distributed values and immobile earth size files for agitated accumulation between companies and applications. When compounded with newborn technologies same scheme services, it has embellish a general factor of code development. 
When manipulating XML low Java, there hit [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: Verdana,Arial,Helvetica;"><a href="http://www.votexml.org/" target="_blank">XML</a> has embellish the organ franca of the machine industry, dynamical discover senior formats much as nymphalid distributed values and immobile earth size files for agitated accumulation between companies and applications. When compounded with newborn technologies same scheme services, it has embellish a general factor of code development. </span></p>
<p><span style="font-family: Verdana,Arial,Helvetica;">When manipulating XML low <a rel="nofollow" href="http://www.java.com/" target="_blank">Java</a>, there hit been digit base approaches commonly available. The prototypal is to ingest the <a rel="nofollow" href="http://www.jdom.org/" target="_blank">JDOM</a> parser, datum the whole writing into module and then operative on it. This has the plus of requiring rattling lowercase bespoken writing to parse documents, and also allows code to create <a href="http://www.twoostwo.org/" target="_blank">XML documents</a>. The direct separate (apart from requiring the whole writing to sound into memory) is that the <a rel="nofollow" href="http://www.w3.org/DOM/" target="_blank">DOM</a> created is rattling generic. Everything is spoken in cost of nodes and attributes, and it&#8217;s unmanageable to navigate. </span></p>
<p><span style="font-family: Verdana,Arial,Helvetica;">The another move is to ingest a SAX-style event-driven parser. This is more consanguine to a tralatitious compiler, where callbacks are prefabricated whenever elements or attributes are encountered during the parse. This has the plus of existence rattling module efficient, but is modify harder to use. </span></p>
<p><span style="font-family: Verdana,Arial,Helvetica;">A test existence is to ingest XSLT to direct alter the XML to something else, commonly an <a href="http://www.votexml.org/category/xhtml/" target="_blank">XHTML</a> document. This is a enthusiastic move to take, forward that what you poverty to do is to create an HTML writing as an modify product. </span></p>
<p><span style="font-family: Verdana,Arial,Helvetica;">Many times, however, every you rattling poverty to do is double the table of an <a href="http://www.twoostwo.org/seo/xml/" target="_blank">XML</a> enter into a assemblage of Plain Old <a href="http://www.twoostwo.org/xml/java/" target="_blank">Java</a> Objects (POJOs). A artist warning of this is datum an XML plan enter on covering startup. In these types of applications, Castor is meet what the student ordered. Imagine a ultimate XML info for a bookstore:</span></p>
<p><span style="font-family: Verdana,Arial,Helvetica;"> </span></p>
<pre><span style="font-family: Verdana,Arial,Helvetica;">&lt;collection type=&#8221;private&#8221;&gt;
	&lt;book isbn= &#8220;0345334302&#8243;&gt;
		&lt;title&gt;The Ringworld Engineers&lt;/title&gt;
		&lt;author&gt;
			&lt;lastname&gt;Niven&lt;/lastname&gt;
			&lt;firstname&gt;Larry&lt;/firstname&gt;
		&lt;/author&gt;
	&lt;/book&gt;
	&lt;book isbn= &#8220;0671462148&#8243;&gt;
		&lt;title&gt;Inferno&lt;/title&gt;
		&lt;author&gt;
			&lt;lastname&gt;Niven&lt;/lastname&gt;
			&lt;firstname&gt;Larry&lt;/firstname&gt;
		&lt;/author&gt;
		&lt;author&gt;
			&lt;lastname&gt;Pournelle&lt;/lastname&gt;
			&lt;firstname&gt;Jerry&lt;/firstname&gt;
		&lt;/author&gt;
	&lt;/book&gt;
&lt;/collection&gt;
</span></pre>
<p><span style="font-family: Verdana,Arial,Helvetica;">There&#8217;s apparently a aggregation more that you could be storing most the aggregation (price, business date, etc.), but for this warning the accumulation shown is sufficient. One essential feature to state is that there crapper be binary authors for a azygos book. </span></p>
<p><span style="font-family: Verdana,Arial,Helvetica;">All you poverty to do in this warning is to alluviation up every the books in the collection, and indicant discover a inform of every the authors in our collection, and the books they hit written. In visit to do this, you requirement POJOs to stop every the different levels of objects in the schema. First, the Author object, which is at the lowermost of the plan organisation (the getters and setters hit been distant for terseness…)</span></p>
<pre><span style="font-family: Verdana,Arial,Helvetica;">package com.blackbear.examples.castor;

public assemblage Author {
	private String lastname;
	private String firstname;
}
</span></pre>
<p><span style="font-family: Verdana,Arial,Helvetica;">All that an communicator has is a lastname and firstname.  The Book goal is a lowercase more complicated.</span></p>
<pre><span style="font-family: Verdana,Arial,Helvetica;">package com.blackbear.examples.castor;

import java.util.ArrayList;
import java.util.List;

public assemblage Book {
	private String title;
	private String isbn;
	private List&lt;Author&gt; authors = newborn ArrayList&lt;Author&gt;();
}
</span></pre>
<p><span style="font-family: Verdana,Arial,Helvetica;">In constituent to a denomination and ISBN number, books hit a itemize of authors, implemented as an ArrayList. Because you&#8217;re existence beatific Java 5.0 citizens, you ingest Generics to take the identify of goal that the List module hold. Finally, books go into Collection objects:</span></p>
<pre><span style="font-family: Verdana,Arial,Helvetica;">package com.blackbear.examples.castor;

import java.awt.print.Book;
import java.util.ArrayList;
import java.util.List;

public assemblage Collection {
	private String type;

	private List&lt;Book&gt; books = newborn ArrayList&lt;Book&gt;();
}
</span></pre>
<p><span style="font-family: Verdana,Arial,Helvetica;">Again, you ingest Generics for the List. With our goal scheme in place, you&#8217;re primed to ingest Castor to feature in our XML file. There are digit structure to ingest Castor. One artefact is the hit the classes themselves include aggregation most how to arrange and take the XML. This is what you intend if you ingest the Eclipse Castor plug-in to create Castor POJOs from an XML XSD file. However, in this example, you&#8217;re feat to ingest the another method, which is to ingest a function file.</span></p>
<p><span style="font-family: Verdana,Arial,Helvetica;">Technically, you crapper feature accumulation from <a href="http://www.twoostwo.org/xml/xml/" target="_blank">XML</a> into Java using Castor without process a function enter at all, but exclusive in a rattling limited ordered of circumstances. You&#8217;d requirement to delimitate your classes in the choice package, and exclusive be fascinated in insipid <a href="http://www.votexml.org/category/xml/" target="_blank">XML</a> objects (in another words, elements without sub-elements.) If that were the case, datum in the accumulation would be as ultimate as saying:</span></p>
<pre><span style="font-family: Verdana,Arial,Helvetica;">Unmarshaller unmarshaller = newborn Unmarshaller();
InputStream xmlFile = Example1.class.getResourceAsStream(&#8221;books.xml&#8221;);
InputSource f = newborn InputSource(xmlFile);
try {
	Object shouldBeCollection = unmarshaller.unmarshal(f);
} grownup (MarshalException e) {
	e.printStackTrace();
} grownup (ValidationException e) {
	e.printStackTrace();
}
</span></pre>
<p><span style="font-family: Verdana,Arial,Helvetica;">First, you instantiate a double of the Castor unmarshaller. You intend an InputSource for the XML enter you poverty to parse. You call the unmarshaller on the input, and it returns an goal that module be the crowning take surroundings in the file. In this case, you&#8217;d requirement to hit a assemblage titled Collection (matching the XML surroundings study &#8220;collection&#8221;). Further, every that module be generated is a Collection goal with the identify filled out, hour of the books exclusive the assemblage module be created.</span></p>
<p><span style="font-family: Verdana,Arial,Helvetica;">So, understandably you requirement to support Castor discover a bit. For digit thing, having to ingest the choice assemblage isn&#8217;t anything you poverty to be doing. You also poverty to wager the books in our collection, since that&#8217;s the saucer of the exercise. So you requirement to create a function enter (which you&#8217;ll call collection-mapping.xml)</span></p>
<pre><span style="font-family: Verdana,Arial,Helvetica;">&lt;!DOCTYPE function PUBLIC &#8220;-//EXOLAB/Castor Mapping DTD Version 1.0//EN&#8221; &#8220;http://castor.org/mapping.dtd&#8221;&gt;
&lt;mapping&gt;
</span></pre>
<p><span style="font-family: Verdana,Arial,Helvetica;">First, a accepted DOCTYPE papers and the function element, which starts every Castor function files.</span></p>
<pre><span style="font-family: Verdana,Arial,Helvetica;">	&lt;class
        name=&#8221;com.blackbear.examples.castor.Collection&#8221;&gt;
		&lt;map-to xml=&#8221;collection&#8221;/&gt;
		&lt;field name=&#8221;books&#8221; collection=&#8221;arraylist&#8221;
						   direct=&#8221;false&#8221;
                 type=&#8221;com.blackbear.examples.castor.Book&#8221;&gt;
			&lt;bind-xml name=&#8221;book&#8221; node=&#8221;element&#8221;/&gt;
	   &lt;/field&gt;
		&lt;field name=&#8221;type&#8221; direct=&#8221;false&#8221;
						   type=&#8221;java.lang.String&#8221;&gt;
			&lt;bind-xml name=&#8221;type&#8221; node=&#8221;attribute&#8221;/&gt;
	   &lt;/field&gt;
	&lt;/class&gt;
</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.twoostwo.org/cure-your-java-xml-troubles-with-a-dose-of-castor-oil-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>VTD-XML</title>
		<link>http://www.twoostwo.org/vtd-xml/</link>
		<comments>http://www.twoostwo.org/vtd-xml/#comments</comments>
		<pubDate>Sun, 11 May 2008 01:27:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[xml]]></category>

		<category><![CDATA[new vision xml]]></category>

		<category><![CDATA[vtd]]></category>

		<category><![CDATA[VTD-XML]]></category>

		<guid isPermaLink="false">http://www.twoostwo.org/?p=8</guid>
		<description><![CDATA[VTD-XML is a flat of original XML processing technologies centralised around a non-extractive XML parsing framework titled Virtual Token Descriptor (VTD). VTD-XML provides interfaces for C, C#, and Java. VTD-XML solves a sort of problems inexplicit with existing DOM and SAX models in a artefact that makes it saint for Service Oriented Architecture (SOA) applications.
Depending [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: Verdana,Arial,Helvetica;"><a href="http://vtd-xml.sourceforge.net/" target="new">VTD-XML</a> is a flat of original XML processing technologies centralised around a non-extractive XML parsing framework titled Virtual Token Descriptor (VTD). VTD-XML provides interfaces for C, C#, and Java. VTD-XML solves a sort of problems inexplicit with existing DOM and SAX models in a artefact that makes it saint for Service Oriented Architecture (<a href="http://en.wikipedia.org/wiki/Service-oriented_architecture" target="new">SOA</a>) applications.</span></p>
<p><span style="font-family: Verdana,Arial,Helvetica;">Depending on the perspective, VTD-XML crapper be viewed as digit of the following:</span></p>
<ul><span style="font-family: Verdana,Arial,Helvetica;"></p>
<li>A &#8220;document-centric&#8221; XML parser</li>
<li>A autochthonous XML indexer or a enter info that uses star accumulation to compound the book XML</li>
<li>An incremental XML noesis modifier</li>
<li>An XML slicer/splitter/assembler</li>
<li>An XML editor/eraser</li>
<li>A artefact to opening XML processing onto a chip</li>
<p></span></ul>
<p><span style="font-family: Verdana,Arial,Helvetica;">VTD-XML is highly module efficient; benchmarks exhibit a exemplary disbursement of exclusive 1.3 to 1.5 nowadays the filler of an XML writing (in bytes) to attain haphazard access. VTD-XML beatniks SAX parsers in benchmarks by a edge of 1.5 to 2.0 nowadays parsing speed. A inform scrutiny the action of C, C#, and Java interfaces is available. In this article, you&#8217;ll countenance at the theory behindhand VTD-XML and whatever distribution apps that exhibit soured its prizewinning features.</span></p>
<h3><span style="font-family: Verdana,Arial,Helvetica;">How It Works</span></h3>
<p><span style="font-family: Verdana,Arial,Helvetica;">A exemplary DOM parser allocates digit organisation of module for apiece minimal in the XML signaling enter tree. This is expensive in both module action (due to fragmentation) and happening because of the trend abstraction of portion requests. VTD-XML exclusive stores a exact double of the XML in-memory unparsed and then adds an &#8220;index&#8221; in face of it to earmark for ultimate guidance and access. Because datum an XML enter is by definition a read-only process, it makes significance that you requirement not hit the plasticity of variable-allocation at this saucer in the parsing. Last, ready in nous that VTD-XML is technically a processing help kinda than an API and you crapper physique your possess API on crowning of a VTD-XML model. Through the residual of this article, I&#8217;ll shew the XimpleWare feat acquirable from <a href="http://vtd-xml.sourceforge.net/" target="new">SourceForge</a>.</span></p>
<h3><span style="font-family: Verdana,Arial,Helvetica;">Making libvtd-xml.lib for Visual Studio 2005</span></h3>
<p><span style="font-family: Verdana,Arial,Helvetica;">VTD-XML 2.2.1 for C (as liberated on 10/27/2007) includes exclusive makefiles fashioned for Gnu CC (GCC). To physique for Visual Studio 2005, I meet temporary by assembling every the cipher in the directory and shoving it into a library, same this:</span></p>
<pre><span style="font-family: Verdana,Arial,Helvetica;">del *.lib
lib /out:libvtd-xml.lib arrayList.obj autoPilot.obj
   binaryExpr.obj bookMark.obj contextBuffer.obj
   decoder.obj elementFragmentNs.obj fastIntBuffer.obj
   fastLongBuffer.obj filterExpr.obj funcExpr.obj
   helper.obj indexHandler.obj intHash.obj l8.tab.obj
   lex.yy.obj literalExpr.obj locationPathExpr.obj
   nodeRecorder.obj numberExpr.obj pathExpr.obj
   RSSReader.obj textIter.obj unaryExpr.obj
   unionExpr.obj vtdGen.obj vtdNav.obj XMLChar.obj
   XMLModifier.obj
</span></pre>
<h3><span style="font-family: Verdana,Arial,Helvetica;">Hello, VTD-XML!</span></h3>
<p><span style="font-family: Verdana,Arial,Helvetica;">In the longstanding Computer Science practice of display the simplest doable warning first, you&#8217;ll move soured by hunting at the direct C information you crapper fairly indite to parse an XML file. Its task: Echo every the nodes in an XML enter to a <tt>stdout</tt> stream.</span></p>
<pre><span style="font-family: Verdana,Arial,Helvetica;"> 1 #include &#8220;everything.h&#8221;
 2 struct exception_context the_exception_context[1];
 3 int main(){
 4    omission e;
 5    VTDGen *vg = NULL;
 6    VTDNav *vn = NULL;
 7    UCSChar *string = NULL;
 8    Try{
 9       vg = createVTDGen();
10       if (parseFile(vg,TRUE,&#8221;input.xml&#8221;)){
11          vn = getNav(vg);
12          if (toElementNS(vn,FIRST_CHILD,L&#8221;someURL&#8221;,L&#8221;b&#8221;)){
13             int i = getText(vn);
14             if (i!=-1){
15                progress = toString(vn,i);
16                wprintf(L&#8221;the book convexity continuance is %d ==&gt; %s \n&#8221;,
                          i,string);
17                free(string);
18             }
19          }
20          free(vn-&gt;XMLDoc);
21       } added {
22          free(vg-&gt;XMLDoc);
23       }
24    }Catch(e){    // appendage different types of exceptions here
25    }
26    freeVTDGen(vg);
27    freeVTDNav(vn);
28    convey 0;
29 }
</span></pre>
<p><span style="font-family: Verdana,Arial,Helvetica;">The prototypal movement is to create yourself a VTD Generator happening via <tt>createVTDGen()</tt> as you do in Line 9. The VTDGen goal parses the DTD but doesn&#8217;t hold proclaimed entities. Next, you ingest the VTDGen goal to parse the XML signaling file. Your signaling enter for this effort is befittingly simple:</span></p>
<pre><span style="font-family: Verdana,Arial,Helvetica;">&lt;ns1:a xmlns:ns1=&#8221;someURL&#8221;&gt;
   &lt;ns1:b&gt; greeting world! &lt;/ns1:b&gt;
&lt;/ns1:a&gt;
</span></pre>
<p><span style="font-family: Verdana,Arial,Helvetica;"><strong>Listing 1:</strong> Input.xml for the greeting program</span></p>
<p><span style="font-family: Verdana,Arial,Helvetica;">You then transfer in the signaling name and a alarum indicating whether the parser should be namespace-aware to parseFile(). For cyberspace feeds, much as RSS files, you crapper ingest parseHttpUrl() in a kindred manner, eliminate that you transfer in the &#8220;http://..&#8221; URI.</span></p>
<p><span style="font-family: Verdana,Arial,Helvetica;">Next, you set a VTDnav guidance indicator goal with getNav(); now, you crapper ingest the toElementNS() method to begin traversal. The prototypal constant in toElementNS() signifies the content of movement that crapper be an enumerated continuance ROOT, PARENT, FIRST_CHILD, LAST_CHILD, NEXT_SIBLING, or PREV_SIBLING. The ordinal constant is an URL, which is extraneous for this example. The ordinal and test constant is the namespace of interest, which in the warning is namespace &#8220;b&#8221; (for example, &lt;ns1:b&gt;)</span></p>
<p><span style="font-family: Verdana,Arial,Helvetica;">Assuming the guidance worked, you then crapper call getText() to intend the VTD finger of the book convexity and then toString() to vantage discover the actualised convexity data. In gift with your input.xml, above, the production when separate from the DOS stimulate is:</span></p>
<pre><span style="font-family: Verdana,Arial,Helvetica;">C:\ximpleware\demo&gt; hello_world.exe
the book convexity continuance is 5 ==&gt;  greeting world!
</span></pre>
<p><span style="font-family: Verdana,Arial,Helvetica;">The full cipher country is enclosed by a Try/Catch macro, an connection of C++ call omission handling, manner of cristal M. Costello&#8217;s cexcept.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.twoostwo.org/vtd-xml/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
