cancel
Showing results for 
Search instead for 
Did you mean: 

DOM and SAX Parser

Former Member
0 Kudos

Hello Friend,

could you help me ob this issues,

1. Types of Java Mapping -- DOM and SAX Parser. Advantages and Disadvantages.

2. XSLT mapping

3.Graphical Mapping--

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

prabhu_s2
Active Contributor
0 Kudos

<b>1. Types of Java Mapping -- DOM and SAX Parser. Advantages and Disadvantages.</b>

http://www.sdc.iup.edu/outreach/fall2000/xml2/domvssax.html

<b>3.Graphical Mapping--</b>

std mapping function provided by sap and it comes by default. thru grahilca mapping u link source and target strucutres and fields

Answers (5)

Answers (5)

Former Member
0 Kudos

K,

Too many post..... to make it simple.....

Message Mapping -> Graphical Design and testing environment. Default Provided By XI. Queue based modelling allow handling or large documents. Extensible via user defined functions

XSLT Mapping - > Based on openstandard, Portable across application platform, Extensible using user defined functions kewl but disadvantage is Memory overload while handling large documents.

SAX -> Simple Api For XML. -> Allows you to parse through a XML document. Doesn't consume any memory. But the message can be parsed only once from top to bottom. It Has evolved by contributions made by group of ppl itz a open architecture.

DOM -> Document Object Model -> Itz designed by W3C. Consumes Memory as the message will be loaded. Allows parsing of document in both way top down and bottom up.

<b>Cheers,

*RAJ*

*REWARD POINTS IF FOUND USEFULL*</b>

Former Member
0 Kudos

HI

Try this

Java Mapping-DOM and SAX:

/people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii

http://www.javacommerce.com/displaypage.jsp?name=index.sql&id=18232

http://www.javacommerce.com/displaypage.jsp?name=saxparser1.sql&id=18232

XSLT Mapping:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb9...

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8...

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/006aa890-0201-0010-1eb1-afc5cbae...

/people/sap.user72/blog/2005/03/15/using-xslt-mapping-in-a-ccbpm-scenario

/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping

Message Mapping:

http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm

/people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i

/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

/people/stefan.grube/blog/2005/12/29/new-functions-in-the-graphical-mapping-tool-xi-30-sp13

Thanks

Former Member
0 Kudos

Hi ravi

Hi;

Go through these links for more detail

XML Tutorail

http://www.javacommerce.com/displaypage.jsp?name=index.sql&id=18232

Using SAX Parser in Java Program

http://www.javacommerce.com/displaypage.jsp?name=saxparser1.sql&id=18232

DOM Parser

http://www.javacommerce.com/displaypage.jsp?name=domparser1.sql&id=18232

Abhishek Agrahari

Award points if it helps

Former Member
0 Kudos

Hi,

For SAX and DOM http://java.sun.com/webservices/docs/1.1/tutorial/doc/

XSLT Mapping

One can also think of Java mapping as another option but it is a bit complex and required knowledge of Java. In such cases, XSLT mapping can be the best approach to meet the requirements.

A few example cases in which an XSLT mapping can be used:-

When the required output is other than XML like Text, Html or XHTML (html displayed as XML)

When default namespace coming from graphical mapping is not required or is to be changed as per requirements.

When data is to be filtered based on certain fields (considering File as source)

When data is to be sorted based on certain field (considering File as source)

When data is to be grouped based on certain field (considering File as source)

Advantages of using XSLT mapping

1.)XSLT program itself defines its own target structure.

XSLT programs can be imported into SAP XI. Message mapping step can be avoided. One can directly go for interface mapping once message interfaces are created and mapping is imported.

XSLT provides use of number of standard XPath functions that can replaces graphical mapping involving user defined java functions easily.

File content conversion at receiver side can be avoided in case of text or html output.

Multiple occurrences of node within tree (source XML) can be handled easily.

XSLT can be used in combination with graphical mapping.

Multi-mapping is also possible using xslt.

XSLT can be used with ABAP and JAVA Extensions.

Disadvantages of using XSLT mapping

    1. Resultant XML payload can not be viewed in SXMB_MONI if not in XML format (for service packs < SP14).

Interface mapping testing does not show proper error description. So errors in XSLT programs are difficult to trace in XI but can be easily identified outside XI using browser.

XSLT mapping requires more memory than mapping classes generated in Java.

XSLT program become lengthier as source structure fields grows in numbers.

XSLT program sometimes become complex to meet desired functionality.

Some XSL functions are dependent on version of browser.

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/xmlXSLTwith+ABAP&

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/mapping+techniques&;

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/xsltsampletoencode%2CdecodeXMLfile&

Graphical mapping - User friendly...Drag & Drop....ease to use

vasanth.

Former Member
0 Kudos

Hi

Java Mapping

Java Mapping uses 2 types of parsers. DOM and SAX. DOM is easier to use with lots of classes to help you create nodes and elements, but , DOM is very processor intensive.

SAX parser is something that parses your XML one after the other, and so is not processor intensive. But, it is not exaclty easy to develop either.

thanks

Former Member
0 Kudos

DOM PARSER API

-


http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html

DOM

---

/people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs

tutorial sax and dom

For a tutorial on the methods of SAX and DOM http://java.sun.com/webservices/docs/1.1/tutorial/doc/

JAVA in xi

-


A very important place where you will use JAVA in XI is while doing your Mapping.

There will be cases when JAVA MAPPING is the best solution to go for.

There are 2 types of Parsers available for JAVA Mapping. DOM Parser and SAX parser. Just got through the following links to understand more on Java Mapping and the APIs available.

http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/package-summary.html

http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Document.html

http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii

Best Regards,

Srikanth

Reward the useful answers and you will get one point yourself