on 12-17-2007 5:35 AM
Dear all,
Can you kindly explain me the Advantages/disadvantages,Capabilities,Failures of Types of mapping.
what is the parser XSLT uses.
what is differnece between sax/dom parsers.
Thanks,
Srinivasa
Hi srinivas phani ,
The following websites give u good documentation on Mapping:
Excellent PDF Document on Mapping
http://help.sap.com/bp_bpmv130/Documentation/Operation/MappingXI30.pdf
Mapping Development with the ABAP Workbench
http://help.sap.com/saphelp_nw04/helpdata/en/10/5abb2d9df242f6a62e22e027a6c382/content.htm
ABAP Mappings
http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/content.htm
how to create a flat file out of an IDoc-XML by means of an ABAP mapping program and the J2EE File Adapter.
How to Use ABAP Mapping in XI 3.0
SAXParser
Both DOM and SAX approaches have advantages and disadvantages, and your choice of technique must depend on the type of data being parsed, the requirements of your application, and the constraints under which you are operating.
The SAX approach is linear: It processes XML structures as it finds them, generating events and leaving the event handlers to decide what to do with each structure. The advantage of this approach is that it is resource-friendly; because SAX does not build a tree representation of the document in memory, it can parse XML data in chunks, processing large amounts of data with very little impact on memory. This also translates into better performance; if your document structure is simple, and the event handlers don't have anything too complicated to do, SAX-based applications will generally offer a speed advantage over DOM-based ones.
The downside, though, is an inability to move around the document in a non- linear manner. SAX does not maintain any internal record of the relationships between the different nodes of an XML document (as the DOM does), making it difficult to create customized node collections or to traverse the document in a non-sequential manner. The only way around this with SAX is to create your own custom object model, and map the document elements into your own custom structuresa process that adds to complexity and can possibly degrade performance.
Where SAX flounders, though, the DOM shines. The DOM creates a tree representation of the document in memory, making it possible to easily travel from one node to another, or even access the same node repeatedly (again, not something you can do easily in SAX). This tree representation is based on a standard, easy-to-understand model, making it easier to write code to interact with it.
This flexibility does, however, come with an important caveat. Because the DOM builds a tree in memory, DOM processing cannot begin until the document has been fully parsed (SAX, on the other hand, can begin parsing a document even if it's not all available immediately). This reduces a developer's ability to "manage" the parsing process by feeding data to the parser in chunks, and also implies greater memory consumption and consequent performance degradation.
Consequently, the choice of technique depends significantly on the type of constraints the application will be performing under, and the type of processing it will be expected to carry out. For systems with limited memory, SAX is a far more efficient approach. On the other hand, complex data-processing requirements can benefit from the standard object model and API of the DOM.
After using DOM to parse XML documents for any length of time, you will probably begin to notice that performance tends to suffer when youre dealing with large documents. This problem is endemic to DOM's tree-based structure: larger trees demand more memory, and DOM must load an entire document into memory before it can allow you to parse it. For situations where performance is problematic with DOM, you have an alternative in the Simple API for XML (SAX). In this fifth installment in our Remedial XML series, I'll introduce you to the SAX API, and provide some links to SAX implementations in several different languages.
Further differences can be seen in the following websites
http://articles.techrepublic.com.com/5100-22-1044823.html
Parsing XML Efficiently : DOM Parsing ,SAX Parsing
http://www.oracle.com/technology/oramag/oracle/03-sep/o53devxml.html
SAX Example
http://www.informit.com/articles/article.aspx?p=26351&seqNum=6&rl=1
Event or DOM parsing?
http://discuss.joelonsoftware.com/default.asp?design.4.156750.12
SAX samples
http://xerces.apache.org/xerces2-j/samples-sax.html
Set up a SAX parser
http://www.ibm.com/developerworks/xml/library/x-tipsaxp.html
Simple API for XML (SAX)
http://en.wikipedia.org/wiki/Simple_API_for_XML
SAX Parser Benchmarks
http://piccolo.sourceforge.net/bench.html
XML Parsers: DOM and SAX Put to the Test
http://www.devx.com/xml/Article/16922/1954?pf=true
High-Performance XML Parsing With SAX
http://www.xml.com/pub/a/2001/02/14/perlsax.html
Using the SAX Parser
http://www.javacommerce.com/displaypage.jsp?name=saxparser1.sql&id=18232
Class SAXParser
http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/SAXParser.html
Class SAXParser
http://people.apache.org/~andyc/neko/doc/html/javadoc/org/cyberneko/html/parsers/SAXParser.html
SAX Parsers
http://webdesign.about.com/od/saxparsers/SAX_Parsers.htm
Interface SAXParser
http://excalibur.apache.org/apidocs/org/apache/excalibur/xml/sax/SAXParser.html
Class SAXParser
http://xerces.apache.org/xerces2-j/javadocs/xerces2/org/apache/xerces/parsers/SAXParser.html
DOM Parsing
Excellent website showing how 2 use Document Object Model (DOM)
Document Object Model (DOM) Parsing
Overview of DOM, DOM Level 3 core,DOM Level 3 Load & Save
http://www.softwaresummit.com/2004/speakers/GrahamJAXP1.pdf
Sample java program using DOM
Easy RFC lookup from XSLT mappings using a Java helper class
XML Transformation Using the TrAX APIs in JAXP
http://www.xml.com/pub/a/2005/07/06/jaxp.html?page=last
cheers!
gyanaraj
****Pls reward points if u find this helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Graphical mapping -> We choose this mapping if the messages are small and no much complicated mappings are necessary...This is done by just dragging from sender to receiver message in the IR
Adv-->need not code explicitly
Disadv--> Not suitable for complicated mapping,
Java Mapping-> This is done when the mapping is a bit complex...this mapping give a lot of flexibility .you can also access runtime constants like senderName or receiverName to implement a mapping that depends on message header
content.
Adv--> u can use both sax and dom parsers
Disadv-->need Java knowledge
XSLT Mapping->
Messages are in the form of XML documents. XSL Transformation (XSLT) is a member of the XML family of languages. It describes how an XML structure is transformed into another XML structure. We can even call external Java methods to convert XML messages
Adv-->simpler than java mapping
Disadvantages-->Worst performance.
ABAP Mapping ->
This is based on ABAP OO classes
Disadv-->need abap knowledge
DOM is easy to use. DOM loads entire XML into memory and so can lead to performance overheads for huge XML.
SAX is a bit complex but provides better perfromance.
please visit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.