Meta tags:
Headings (most frequently used words):
interface, java, api, for, xml, processing, contents, dom, sax, stax, xslt, citations, references, external, links, example,
Text of the page (most frequently used words):
the (94), xml (48), and (30), java (28), document (24), #interface (24), this (21), for (16), xsl (16), api (14), xslt (14), jaxp (12), edit (12), version (11), transform (11), javax (11), that (11), article (11), was (10), source (10), parser (10), with (9), transformerfactory (9), main (9), dom (9), sax (9), parsing (8), stylesheet (8), import (8), methods (8), called (8), wikipedia (7), may (7), page (7), articles (7), interfaces (7), data (7), text (6), references (6), from (6), citations (6), renode (6), reroot (6), root (6), node (6), transformation (6), new (6), are (6), object (6), application (6), processing (5), contents (5), template (5), links (5), example (5), specification (5), org (5), enterprise (5), jsr (5), encoding (5), utf (5), result (5), method (5), transformer (5), class (5), create (5), between (5), stax (5), end (5), when (5), learn (5), search (4), lacking (4), june (4), 2013 (4), parsers (4), other (4), val (4), output (4), streamsource (4), newtransformer (4), string (4), most (4), representing (4), documents (4), provides (4), start (4), element (4), memory (4), nodes (4), how (4), remove (4), hide (4), move (4), sidebar (4), toggle (3), view (3), using (3), use (3), multiple (3), issues (3), all (3), index (3), platform (3), streaming (3), jax (3), web (3), language (3), external (3), community (3), hello (3), world (3), will (3), select (3), xmlresultresource (3), streamresult (3), stringreader (3), newinstance (3), stringwriter (3), stream (3), file (3), processor (3), implements (3), each (3), which (3), kinds (3), different (3), templates (3), clients (3), these (3), defaulthandler (3), representation (3), structure (3), found (3), tree (3), documentbuilder (3), model (3), message (3), please (3), help (3), improve (3), sources (3), tools (3), languages (2), table (2), developers (2), code (2), contact (2), about (2), privacy (2), policy (2), available (2), under (2), terms (2), apply (2), categories (2), wayback (2), reliable (2), short (2), description (2), wikidata (2), requests (2), also (2), related (2), services (2), app (2), pages (2), edition (2), horstmann (2), 2022 (2), core (2), 2000 (2), process (2), 206 (2), following (2), hardcoded (2), value (2), match (2), indent (2), http (2), www (2), 1999 (2), xmlns (2), out (2), xmlsourceresource (2), xmltransformer (2), xsltresource (2), transformerexception (2), transformerfactoryconfigurationerror (2), public (2), xsltdemo (2), examples (2), package (2), but (2), complete (2), defined (2), can (2), processors (2), several (2), standard (2), factory (2), form (2), used (2), same (2), parameters (2), allowing (2), classloader (2), into (2), developed (2), point (2), cursor (2), within (2), information (2), events (2), provide (2), tags (2), corresponding (2), important (2), contenthandler (2), creates (2), invoking (2), instance (2), simple (2), w3c (2), jdk (2), has (2), programming (2), general (2), talk (2), appearance (2), upload (2), changes (2), history (2), read (2), log (2), account (2), donate (2), menu (2), add, topic, mobile, cookie, statement, statistics, conduct, legal, safety, contacts, disclaimers, additional, site, you, agree, registered, trademark, non, profit, organization, wikimedia, foundation, inc, creative, commons, attribution, sharealike, license, rendered, parsoid, last, edited, 2026, utc, hidden, webarchive, maintenance, matches, retrieved, https, php, title, java_api_for_xml_processing, oldid, 1355635041, see, category, jmx, jdbc, management, rpc, jaxr, removed, jaf, jaxb, jaxm, metadata, soap, attachments, annotations, jca, mail, jta, jms, jpa, beans, bean, validation, dependency, injection, websocket, facelets, faces, jstl, expression, servlet, formerly, known, j2ee, specifications, jakarta, machine, 2011, archived, reference, implementation, project, home, cay, april, oracle, press, 978, 787107, isbn, compare, request, finalised, march, program, jsrs, detail, execution, applies, tostring, getbuffer, println, system, throws, args, void, static, src, primitive, launching, look, like, two, abstract, represent, input, somewhat, unconventional, since, there, expectation, accept, any, choose, prepared, handle, practice, supports, possibly, implementations, their, own, saxresult, domresult, saxsource, domsource, compiled, thread, safe, repeatedly, series, parallel, executable, cannot, shared, across, threads, though, serially, reusable, set, serialization, options, whether, should, indented, actually, run, xmlsource, outputtarget, newtemplates, dynamically, wishes, factoryclassname, features, tylesheet, anguage, ransformations, allows, conversion, forms, applications, invoke, originally, trax, informal, collaboration, number, designed, median, its, metaphor, programmatic, entry, represents, moves, forward, pulling, needs, event, based, such, pushes, requiring, maintain, state, necessary, keep, track, location, introduced, during, need, access, possible, store, local, cache, frequently, catalog, subclass, overrides, processes, involve, storing, database, writing, contained, characters, endelement, startelement, enddocument, startdocument, interested, encounters, elements, entityresolver, dtdhandler, errorhandler, unlike, does, not, runs, faster, uses, less, instead, informs, callbacks, provided, way, accessing, saxparser, saxparserfactory, have, attributes, builds, created, containing, among, many, types, type, include, documentbuilderfactory, parses, entire, constructs, classes, modeling, concepts, level, released, september, 2010, declared, february, 2008, life, bundled, addition, structural, transformations, part, separate, jar, one, apis, capability, validating, three, basic, pee, jaks, computing, discuss, adding, jstor, scholar, books, newspapers, news, find, secondary, tertiary, relies, excessively, primary, includes, list, more, precise, introducing, lacks, sufficient, inline, messages, free, encyclopedia, item, projects, printable, download, pdf, print, export, switch, legacy, get, shortened, url, cite, permanent, link, what, here, actions, english, tiếng, việt, русский, português, nederlands, 한국어, 日本語, magyar, français, deutsch, subsection, top, personal, special, recent, portal, contribute, random, current, navigation, jump, content,
Text of the page (random words):
java api for xml processing wikipedia jump to content main menu main menu move to sidebar hide navigation main page contents current events random article about wikipedia contact us contribute help learn to edit community portal recent changes upload file special pages search search appearance donate create account log in personal tools donate create account log in contents move to sidebar hide top 1 dom interface 2 sax interface 3 stax interface 4 xslt interface toggle xslt interface subsection 4 1 example 5 citations 6 references 7 external links toggle the table of contents java api for xml processing 10 languages deutsch français magyar 日本語 한국어 nederlands português русский tiếng việt 中文 edit links article talk english read edit view history tools tools move to sidebar hide actions read edit view history general what links here related changes upload file permanent link page information cite this page get shortened url switch to legacy parser print export download as pdf printable version in other projects wikidata item appearance move to sidebar hide from wikipedia the free encyclopedia java application programming interface this article has multiple issues please help improve it or discuss these issues on the talk page learn how and when to remove these messages this article includes a list of general references but lacks sufficient corresponding inline citations please help improve this article by introducing more precise citations june 2013 learn how and when to remove this message this article relies excessively on references to primary sources please improve this article by adding secondary or tertiary sources find sources java api for xml processing news newspapers books scholar jstor june 2013 learn how and when to remove this message learn how and when to remove this message in computing the java api for xml processing jaxp ˈ dʒ æ k s p iː jaks pee one of the java xml application programming interfaces apis provides the capability of validating and parsing xml documents it has three basic parsing interfaces the document object model parsing interface or dom interface the simple api for xml parsing interface or sax interface the streaming api for xml or stax interface part of jdk 6 separate jar available for jdk 5 in addition to the parsing interfaces the api provides an xslt interface to provide data and structural transformations on an xml document jaxp was developed under the java community process as jsr 5 jaxp 1 0 jsr 63 jaxp 1 1 and 1 2 and jsr 206 jaxp 1 3 java se version jaxp version bundled 1 4 1 1 1 5 1 3 1 6 1 4 1 7 0 1 4 5 1 7 40 1 5 1 8 1 6 1 jaxp version 1 4 4 was released on september 3 2010 jaxp 1 3 was declared end of life on february 12 2008 dom interface edit main article document object model the dom interface parses an entire xml document and constructs a complete in memory representation of the document using the classes and modeling the concepts found in the document object model level 2 core specification the dom parser is called a documentbuilder as it builds an in memory document representation the javax xml parsers documentbuilder is created by the javax xml parsers documentbuilderfactory 2 the documentbuilder creates an org w3c dom document instance a tree structure containing nodes in the xml document each tree node in the structure implements the org w3c dom node interface among the many different types of tree nodes each representing the type of data found in an xml document the most important include element nodes that may have attributes text nodes representing the text found between the start and end tags of a document element sax interface edit main article simple api for xml the javax xml parsers saxparserfactory creates the sax parser called the saxparser unlike the dom parser the sax parser does not create an in memory representation of the xml document and so runs faster and uses less memory instead the sax parser informs clients of the xml document structure by invoking callbacks that is by invoking methods on an defaulthandler instance provided to the parser this way of accessing document is called streaming xml the defaulthandler class implements the contenthandler the errorhandler the dtdhandler and the entityresolver interfaces most clients will be interested in methods defined in the contenthandler interface that are called when the sax parser encounters the corresponding elements in the xml document the most important methods in this interface are startdocument and enddocument methods that are called at the start and end of a xml document startelement and endelement methods that are called at the start and end of a document element characters method that is called with the text data contents contained between the start and end tags of an xml document element clients provide a subclass of the defaulthandler that overrides these methods and processes the data this may involve storing the data into a database or writing it out to a stream during parsing the parser may need to access external documents it is possible to store a local cache for frequently used documents using an xml catalog this was introduced with java 1 3 in may 2000 3 stax interface edit main article stax stax was designed as a median between the dom and sax interface in its metaphor the programmatic entry point is a cursor that represents a point within the document the application moves the cursor forward pulling the information from the parser as it needs this is different from an event based api such as sax which pushes data to the application requiring the application to maintain state between events as necessary to keep track of location within the document xslt interface edit main article xslt the x ml s tylesheet l anguage for t ransformations or xslt allows for conversion of an xml document into other forms of data jaxp provides interfaces in package javax xml transform allowing applications to invoke an xslt transformation this interface was originally called trax transformation api for xml and was developed by an informal collaboration between the developers of a number of java xslt processors main features of the interface are a factory class allowing the application to select dynamically which xslt processor it wishes to use transformerfactory transformerfactory newinstance transformerfactory newinstance string factoryclassname classloader classloader methods on the factory class to create a templates object representing the compiled form of a stylesheet this is a thread safe object that can be used repeatedly in series or in parallel to apply the same stylesheet to multiple source documents or to the same source document with different parameters transformerfactory newtemplates source source also transformerfactory newtransformer source source transformerfactory newtransformer a method on the templates object to create a javax xml transform transformer representing the executable form of a stylesheet templates newtransformer this cannot be shared across threads though it is serially reusable the transformer provides methods to set stylesheet parameters and serialization options for example whether output should be indented and a method to actually run the transformation transformerfactory transformer source xmlsource result outputtarget two abstract interfaces source and result are defined to represent the input and output of the transformation this is a somewhat unconventional use of java interfaces since there is no expectation that a processor will accept any class that implements the interface each processor can choose which kinds of source or result it is prepared to handle in practice all jaxp processors supports several standard kinds of source domsource saxsource streamsource and several standard kinds of result domresult saxresult streamresult and possibly other implementations of their own example edit the most primitive but complete example of xslt transformation launching may look like this file src examples xslt xsltdemo java package examples xslt import java io stringreader import java io stringwriter import javax xml transform transformer import javax xml transform transformerexception import javax xml transform transformerfactory import javax xml transform transformerfactoryconfigurationerror import javax xml transform stream streamresult import javax xml transform stream streamsource public class xsltdemo public static void main string args throws transformerfactoryconfigurationerror transformerexception language xslt string xsltresource xml version 1 0 encoding utf 8 xsl stylesheet version 2 0 xmlns xsl http www w3 org 1999 xsl transform xsl output method xml indent no xsl template match reroot renode xsl value of select root node val world renode reroot xsl template xsl stylesheet language xml string xmlsourceresource xml version 1 0 encoding utf 8 root node val hello root stringwriter xmlresultresource new stringwriter transformer xmltransformer transformerfactory newinstance newtransformer new streamsource new stringreader xsltresource xmltransformer transform new streamsource new stringreader xmlsourceresource new streamresult xmlresultresource system out println xmlresultresource getbuffer tostring it applies the following hardcoded xslt transformation xml version 1 0 encoding utf 8 xsl stylesheet version 2 0 xmlns xsl http www w3 org 1999 xsl transform xsl output method xml indent no xsl template match reroot renode xsl value of select root node val world renode reroot xsl template xsl stylesheet to the following hardcoded xml document xml version 1 0 encoding utf 8 root node val hello root the result of execution will be xml version 1 0 encoding utf 8 reroot renode hello world renode reroot citations edit the java community process sm program jsrs java specification requests detail jsr 206 horstmann 2022 3 3 parsing an xml document compare the java 1 2 1 api index with the 1 3 index the java specification request jsr 5 xml parsing specification was finalised on 21 march 2000 references edit horstmann cay april 15 2022 core java oracle press java isbn 978 0 13 787107 0 external links edit jaxp reference implementation project home page archived 2011 08 12 at the wayback machine v t e jakarta ee specifications formerly known as java platform enterprise edition java ee and java 2 platform enterprise edition j2ee web app servlet pages expression language jstl faces facelets websocket enterprise app dependency injection bean validation enterprise beans jpa jms jta mail jca annotations web services jax rs jax ws soap with attachments web services metadata jaxm other jaxb jaf removed jaxr jax rpc management related jaxp jdbc jmx streaming api for xml see also category java enterprise platform retrieved from https en wikipedia org w index php title java_api_for_xml_processing oldid 1355635041 categories java api for xml java specification requests xml parsers hidden categories articles with short description short description matches wikidata articles lacking in text citations from june 2013 all articles lacking in text citations articles lacking reliable references from june 2013 all articles lacking reliable references articles with multiple maintenance issues articles with example java code webarchive template wayback links this page was last edited on 23 may 2026 at 00 31 utc page was rendered with parsoid text is available under the creative commons attribution sharealike 4 0 license additional terms may apply by using this site you agree to the terms of use and privacy policy wikipedia is a registered trademark of the wikimedia foundation inc a non profit organization privacy policy about wikipedia disclaimers contact wikipedia legal safety contacts code of conduct developers statistics cookie statement mobile view search search toggle the table of contents java api for xml processing 10 languages add topic
|