Options for XML parsing in WAS 6.20 ABAP and higher

Hello Experts,
   What options are available to me for working with XML documents in SAP R/3 4.7? I am working on SAP WAS 6.20 ABAP and was wondering which tools/techniques I can use for parsing XML files?
   I am developing an ABAP program and primarily need to be able to parse XML documents. I need to be able to traverse up and down their data structures (trees/nodes/elements/etc.).
   In SAP R/3 4.6 I used to use the iXML library but it seems that there are many advanced and powerful features included in SAP WAS 6.20 ABAP and up.
   Could someone please give me a summary of and their opinions on some these "newer" options?
Thanks,
- Vik.

Hi Vik,
   There are two ways you can parse/interpret XML documents in ABAP -
   1. iXML - Which you have already used in 46 release. It wasn't easy to use set of functions but still it was possible to parse documents using iXML library. In WAS 6.20 you can now use class CL_XML_DOCUMENT which is much more easier to use than iXML library. It is bilt on top of iXML using the same DOM model.
  2. XSLT - Useing XSLT_TOOLS or XSLT transaction you can create XSLT programs to transform XML to ABAP data objects and then work with ABAP data objects. In this case you have the option of using some other tool like XMLSPY to write the XSLT and then copy that to SAP.
From your post it looks like you will probably have to traverse the tree in unpridictable way, probably DOM based parsing using CL_XML_DOCUMENT is more suitable for you.
Cheers,
Sanjeev

Similar Messages

  • Issue of xml parser on WAS

    this is regarding using oracle xml parser on WAS. we are facing the same issue as was posted on this forum
    xmlparserv2.jar cause IBM WebSphere v5.1 down.
    what i need to know is has there been any other issue even after implementing those solution? plz do reply
    Best Regadrs

    the error that we get on the server is : -
    SystemErr R java.lang.IncompatibleClassChangeError\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.dom4j.tree.AbstractElement.setAttributes(AbstractElement.java:505)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.dom4j.io.SAXContentHandler.addAttributes(SAXContentHandler.java:916)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.dom4j.io.SAXContentHandler.startElement(SAXContentHandler.java:249)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.dom4j.io.SAXReader.read(SAXReader.java:465)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.hibernate.cfg.Configuration.configure(Configuration.java:1098)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at org.imf.dmfs.dal.util.dao.HibernateUtil.<clinit>(HibernateUtil.java:34)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at java.lang.J9VMInternals.initializeImpl(Native Method)\par
    12/8/09 10:23:07:181 PKT 000086e2 SystemErr R at java.lang.J9VMInternals.initialize(J9VMInternals.java:196)\par
    2. the applications is being depl in WAR.
    3. ClassLoader Policy : parent last
    deleting META-INF/services folder in oracle parser jar file has no effect.
    PLZ HELP ME OUT

  • What is the best api for xml parsing?

    I think that api comes with j2se is not that good for xml parsing. is there any open source api which is simple,easy and powerful,

    JArsenic wrote:
    Hey I feel XMLBeans would be a optimal solution for XML parsing as I provides you a whole set of methods to parse your XML tags as Java Objects. And you may download XMLBeans @ http://xmlbeans.apache.org/.
    What advantage would that have over JAXB? It already can do all that and is built into Java itself, so you don't need a separate download.
    Also: mapping XML to Java beans is a very specific way of handling XML and is definitely not "the best" in all situations.
    For similar quest you may reach @ [somesite]Please, no advertisement here, read the Code of Conduct that you agreed on singing up with this page.

  • Hi I replaced my hard drive on macbook and I want to install mac osx10.5 with the CD that came with the macbook. When I run the CD after a while I get the page showing language options for 2 second then a gray screen appears and nothing happens

    Hi I replaced my hard drive on macbook and I want to install mac osx10.5 with the CD that came with the macbook. When I run the CD after a while I get the page showing language options for 2 second then a gray screen appears and nothing happens. I partitioned my hard drive and I tried installing Microsoft windows and that worked just fine.  But I do not understand why it wont install mac os x 10.5?????  PLEASE HELP ME.  Thanks  Hamid

    Try a new post in the 10.5 Installation forum.
    DALE

  • How to get WHAT U HEAR option for PCI Express X-Fi Titanium sound card and Windows 7

    how to get WHAT U HEAR option for PCI Express X-Fi Titanium sound card and Windows 7 ? Is it on the basic driver? or do you have to install some other software?
    jane

    You have to install the rest of the software(s) for the sound card. The software is (if it is with the installation CD, though) called "Creative Smart Recorder" or something like that.

  • I'm using the sync option for when I'm not near my desktop and no matter what it won't work its telling me my account name or password is not correct and it is!

    I'm using the sync option for when I'm not near my desktop and no matter what it won't work its telling me my account name or password is not correct and it is!

    This is from my personal experience:
    It almost happens every time I tried to connect with Sync from my Android phone, the window asking me to enter my account name and password always shows up. And if I enter the information, it'll say I have the wrong password, etc. My workaround is to click the "cancel" button. But it does not cancel immediately. The window will stay on for a while (usually a few minutes), then it'll disappear and start connecting to Sync. And it'll connect and sync successfully.
    You can try this workaround but you have to be patient to wait for the window to disappear.
    I don't know what is the cause of this, but it has happened ever since FF4 for Mobile came out. I have searched around and couldn't find any solutions.

  • What is the best solution for xml parsing?

    Hi. I've got a huge problem with the XML xtra. When I was
    running my application the memory usage started to grow up
    and up...I've only parse the XML once on the beggining, so I
    thought that maybe it was a problem with the garbage
    colector, etc...after a loooong time, I've realized that
    every time that I access some node to get some information, the
    movie uses more and more memory. I've read in the groups that
    the XML xtra is known for memory leaks issues, so I've
    did what they suggested and changed to the dom-lingo cast
    (the one from shocknet)...The problem is that now when I'm
    parsing the XML it takes like 50 seconds (with the XML xtra
    it was like 2 secs) something that I think it would be too slow
    for the end-user... I don't know if there's a faster (and
    free) alternative...
    I'm using Director MX and my XML file it's about 550 kb
    Thanks.

    It's reported tht the main memory leak has been fixed as of
    10.1, a more
    mino r node reference related leak can be worked around
    http://www.killingmoon.com/director/bugs/xml_parser/
    A workaround some used before the xtra beng made usable was
    to call on
    the Flash XML object available via in the flash xtra, here's
    an article.
    "Reading XML Into Director MX 2004 With a Simple Flash
    Object"
    http://director-online.com/buildArticle.php?id=1154

  • What Oracle version for XML Parser for java

    Is the XML Parser for Java only available for use with
    Oracle 8i? Is it possible to use with Oracle 8.05
    null

    The XML Parser for Java can be used with any of the supported
    version JavaVMs. The only difference with 8i is that you can
    load it into the database and use JServer which is an internal
    VM. For 8.0.5 you simple run it externally and connect through
    JDBC.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Eddie SHipman (guest) wrote:
    : Is the XML Parser for Java only available for use with
    : Oracle 8i? Is it possible to use with Oracle 8.05
    null

  • Regular expressions for xml parsing

    I have a xml parsing problem that I have to solve using regular expressions. It's not possible for me to use a different method other than regular expression. But there is a problem that I cannot seem to rap my head around. I want to extract the contents of a tag but the problem is that this tag occurs serveral times in the XML file but I only want the contents of one particular occurence. Basically the problem is as follows;
    I want to extract
    <bp:NAME ***stufff***>(I want this part)</bp:NAME>This tag can occur is serval places. For example here;
    <bp:ORGANISM>
    ***bunch of tags***
    <bp:NAME ***stufff***>***stufff***</bp:NAME>
    ***bunch of tags***
    </bp:ORGANISM>or here;
    <bp:DATABASE>
    ***bunch of tags***
    <bp:NAME ***stufff***>***stufff***</bp:NAME>
    ***bunch of tags***
    </bp:DATABASE>I do not want the content of those tags. I want the content of the <NAME> tag that is not between either the <ORGANISM> tags or the <DATABASE> tags. These tags can be in any order. I for the life of me cannot seem to figure this problem out. I tried several different approaches. For example I tried using the following regex
    (?:<bp:NAME [^>]*>([^<]*).*?<bp:ORGANISM>.*?</bp:ORGANISM>|
    <bp:ORGANISM>.*?</bp:ORGANISM>.*?<bp:NAME [^>]*>([^<]*))This kind of works, the information I want is either in the first captured group or in the second one. So I just check which group is not empty and that is the one I want. But this only works if there is only one other tag containing the name tag (in this particular regular expression that is the organism tag). Since there is another tag (the database tag) I have to work around, and these tags can be in any order, the regular expression then becomes three times as large and then there are six different groups in which the information I want can occur. This does not seem like a good idea to me. There has to be another way to do this. So I tried using the following regex;
    (?:</bp:ORGANISM>)?.*?(?:</bp:DATABASE>)?.*?<bp:NAME [^>]*>([^<]*)I thought this would get rid of any occurences of the other tags in front of the name tag, but it doesn't work either. It seems like it is not greedy enough. Well I think you get the point. I don't know what to try next so I really need some help.
    Here is an example of the type of data I will run into. The tags can be in any order and they do not always have to occur. In the example below the <DATABASE> tag is not part of the data and the name tag I want just happens to be in front of the organism tag but this is not always the case. The name tag I want is the firstname tag in the file, namely;
    <bp:NAME rdf:datatype="xsd:string">Progesterone receptor</bp:NAME>So I don't want the name tag that is in between the organism tags.
    <bp:protein rdf:ID="CPATH-27885">
    &#8722;<bp:COMMENT rdf:datatype="xsd:string">
    Belongs to the nuclear hormone receptor family. NR3 subfamily. SIMILARITY: Contains 1 nuclear receptor DNA-binding domain. WEB RESOURCE: Name=NIEHS-SNPs; URL="http://egp.gs.washington.edu/data/pgr/"; WEB RESOURCE: Name=Wikipedia; Note=Progesterone receptor entry; URL="http://en.wikipedia.org/wiki/Progesterone_receptor"; GENE SYNONYMS: NR3C3. COPYRIGHT:  Protein annotation is derived from the UniProt Consortium (http://www.uniprot.org/).  Distributed under the Creative Commons Attribution-NoDerivs License.
    </bp:COMMENT>
    <bp:SYNONYMS rdf:datatype="xsd:string">Nuclear receptor subfamily 3 group C member 3</bp:SYNONYMS>
    <bp:SYNONYMS rdf:datatype="xsd:string">PR</bp:SYNONYMS>
    <bp:NAME rdf:datatype="xsd:string">Progesterone receptor</bp:NAME>
    &#8722;<bp:ORGANISM>
    &#8722;<bp:bioSource rdf:ID="CPATH-LOCAL-112384">
    <bp:NAME rdf:datatype="xsd:string">Homo sapiens</bp:NAME>
    &#8722;<bp:TAXON-XREF>
    &#8722;<bp:unificationXref rdf:ID="CPATH-LOCAL-112385">
    <bp:DB rdf:datatype="xsd:string">NCBI_TAXONOMY</bp:DB>
    <bp:ID rdf:datatype="xsd:string">9606</bp:ID>
    </bp:unificationXref>
    </bp:TAXON-XREF>
    </bp:bioSource>
    </bp:ORGANISM>
    <bp:SHORT-NAME rdf:datatype="xsd:string">PRGR_HUMAN</bp:SHORT-NAME>
    &#8722;<bp:XREF>
    &#8722;<bp:relationshipXref rdf:ID="CPATH-LOCAL-112386">
    <bp:DB rdf:datatype="xsd:string">ENTREZ_GENE</bp:DB>
    <bp:ID rdf:datatype="xsd:string">5241</bp:ID>
    </bp:relationshipXref>
    </bp:XREF>
    &#8722;<bp:XREF>
    &#8722;<bp:unificationXref rdf:ID="CPATH-LOCAL-112387">
    <bp:DB rdf:datatype="xsd:string">UNIPROT</bp:DB>
    <bp:ID rdf:datatype="xsd:string">P06401</bp:ID>
    </bp:unificationXref>
    </bp:XREF>
    &#8722;<bp:XREF>
    &#8722;<bp:unificationXref rdf:ID="CPATH-LOCAL-112388">
    <bp:DB rdf:datatype="xsd:string">UNIPROT</bp:DB>
    <bp:ID rdf:datatype="xsd:string">A7X8B0</bp:ID>
    </bp:unificationXref>
    </bp:XREF>
    &#8722;<bp:XREF>
    &#8722;<bp:relationshipXref rdf:ID="CPATH-LOCAL-112389">
    <bp:DB rdf:datatype="xsd:string">GENE_SYMBOL</bp:DB>
    <bp:ID rdf:datatype="xsd:string">PGR</bp:ID>
    </bp:relationshipXref>
    </bp:XREF>
    &#8722;<bp:XREF>
    &#8722;<bp:relationshipXref rdf:ID="CPATH-LOCAL-112390">
    <bp:DB rdf:datatype="xsd:string">REF_SEQ</bp:DB>
    <bp:ID rdf:datatype="xsd:string">NP_000917</bp:ID>
    </bp:relationshipXref>
    </bp:XREF>
    &#8722;<bp:XREF>
    &#8722;<bp:unificationXref rdf:ID="CPATH-LOCAL-112391">
    <bp:DB rdf:datatype="xsd:string">UNIPROT</bp:DB>
    <bp:ID rdf:datatype="xsd:string">Q9UPF7</bp:ID>
    </bp:unificationXref>
    </bp:XREF>
    &#8722;<bp:XREF>
    &#8722;<bp:unificationXref rdf:ID="CPATH-LOCAL-113580">
    <bp:DB rdf:datatype="http://www.w3.org/2001/XMLSchema#string">CPATH</bp:DB>
    <bp:ID rdf:datatype="http://www.w3.org/2001/XMLSchema#string">27885</bp:ID>
    </bp:unificationXref>
    </bp:XREF>
    </bp:protein>Edited by: Dani3ll3 on Nov 19, 2009 2:51 AM

    Dani3ll3 wrote:
    Thanks a lot after I did that the regular expression worked. :)Good. But remember that in real life, you would then have to apply the XML rules to get the actual contents of the text node. For example it might be a CDATA section or it might include characters like ampersands which have been escaped and which you need to unescape. That's why it's better to use a proper parser, as already suggested.
    It seems to me this forum is full of posts where people are doing homework questions which teach them to do things the wrong way. But of course there's nothing the student can do about that.

  • I'd like to see a floating license option for XML Author.

    I am an experienced structured FM user. I am trying to set up a structured authoring environment for a small engineering firm. I write and edit documentation for aviation engineering projects. I work with six to eight engineers and designers who contribute content to our technical publications.
    I want to minimize authoring overhead by eliminating manual formatting from my contributor workflow. Ideally, I would manage EDDs, DTDs, templates etc. and deploy several XML author licenses to collect content. However, the cost of an XML author license per each potential contributor is prohibitive for my small firm. I would love to be able to deploy XML Author through Creative Cloud either as a single-app license or as part of a team license.
    Several other authoring platforms including Flare (no structured support, I know) offer a floating license option. I think a floating license option would make the Structured Frame/XML Author combo more competitive for Adobe and more attractive to small firms like mine.

    Tell someone who make iphone apps.

  • Can I don't use sapxmltoolkit for xml parsing?

    Hi SDN,
    I have a J2EE application with Struts frontend. I
    I have successfully deployed and run without problem on SAP WebAS 6.40 (Slim Edition). However, when I tried to deploy and run the same application on the Java Edition that comes with EP, there is a "Provider com.sap.engine.lib.jaxp.DocumentBuilderFactoryImpl not found" error due to missing reference to the sapxmltoolkit library. I added the reference to the sapxmltoolkit library in my application and that resolves the error but my frontend still does not display correctly.
    My application EAR already contains the Xerces parser library and I would like to stick to that but I saw that
    system properties for javax.xml.parsers.DocumentBuilderFactory has been set to com.sap.engine.lib.jaxp.DocumentBuilderFactoryImpl.
    How can I make my application use the xerces parser without hardcoding the use of xerces parser implementation in my code?
    Thanks!

    Hello,
    I performed some tests on my system but unfortunately I was not able to find an appropriate solution if some other application had already set JAXP system property. I noticed that I had given you a wrong note number - the notes that I've meant are 881597 and 609804. Note 881597 contains a jar file, which will identify the thread, which sets the JAXP system property. You said that you are able to run your application on NetWeaver slim edition so I am quite sure that one of the deployed applications (on the other J2EE Engine) sets the property.
    I am sorry that I cannot help much.
    Regards
    Vyara

  • How to change UTF-8 encoding for XML parser (PL/SQL) ?

    Hello,
    I'm trying to parse xml file stored in CLOB.
    p := xmlparser.newParser;
    xmlparser.parseCLOB(p, CLOB_xmlBody);
    Standard PL/SQL parser encoding is UTF-8. But my xml CLOB contain ISO-8859-2 characters.
    Can you advise me, please, how to change encoding for parser?
    Any help would be appreciated.
    null

    Do you documents contain an XML Declaration like this at the top?
    <?xml version="1.0" encoding="ISO-8859-2"?>
    If not, then they need to. The XML 1.0 specification says that if an XML declaration is not present, the processor must default to assume its in UTF-8 encoding.

  • In Oracle 10g for XML  parsing what jar files have to be loaded?

    I am trying to parse the sample xml file. I want to know what are the jar files which needs to be loaded in Oracle 10g. In Oracle 9i I have files which have been asked to load in to the database.
    1) xmlparserv2.jar and
    2) xmlplsql.jar
    But in Oracle 10g under lib I could see only xmlparserv2.jar.What are the jar files which have to be loaded using loadjava in this case?

    Something like this ?
    SELECT REGEXP_REPLACE('TABLE_COLUMN_1_ID,TABLE_COLUMN_2_VALUE,TABLE_COLUMN_3_DESC',
                          '([^,]+)', ' \1 = \1') x
    FROM DUAL;
    X
    TABLE_COLUMN_1_ID = TABLE_COLUMN_1_ID, TABLE_COLUMN_2_VALUE = TABLE_COLUMN_2_VALUE, TABLE_COLUMN_3_DESC = TABLE_COLUMN_3_DESC

  • Defining Server Caching Options for XML?

    Hi all...
    Using CS3, I've created an XSLT fragment to consume an RSS
    feed, and inserted that in a homepage, following this tutorial for
    DW8:
    http://www.adobe.com/devnet/dreamweaver/articles/dw_xsl_rss.html
    It works great, but I'm curious... what do I edit (or add) to
    define caching of the XML on the server? I want to limit it to an
    update every few hours or so, to minimize bandwith usage.
    Thanks for any help, kinda learning this all as I go....
    Oh, and it's a .cfm page, but it's not live yet...

    Nobody knows what Dizzy means. Don't be fooled by his
    response. He is a
    spammer/script kiddy for sure.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "StearmanDriver" <[email protected]> wrote
    in message
    news:g3knj3$ojr$[email protected]..
    > Hey, thanks for the response, Dizzy. I'm not quite sure
    what you mean
    > though.
    > Do you mean the answer can be found in THIS forum? If
    so, do you know
    > where,
    > or what search terms would be used to find it? 'Cause I
    searched quite a
    > bit,
    > and couldn't find anything relevant. That's probably
    because I don't know
    > the
    > proper terms to search for though.
    >
    > Thanks for clarifying...
    >

  • Importing packages for XMl parsing

    In my Java program,statements to import org.w3c.dom, org.xml.sax, javax.xml.parsers, javax.ejb packages are not working.Can somebody tell me which jar files I should add in the classpath of my machine?

    You need to retrieve the j2ee.jar file from sun.
    http://java.sun.com/j2ee/1.4/download.html#sdk

Maybe you are looking for

  • Controlling multiple screens

    Although this is on a Mac Pro I think it's more a leopard question. The two display ports on my Mac Pro are connected to a Cinema display and a Panasonic TV (HDMI). The Cinema display is my main display and the Panasonic used for occasional viewing o

  • Trying to import photos into Lightroom 5 isn't working

    I am trying to import photos into my lightroom 5 catalog and it isn't working.  Done this MANY times before and this time nothing.  Tried importing directly from memory card and copying the files to the hard drive both just start the process and it n

  • How to use custom function.

    i write a custom funciton contain a sql sentence like this: SELECT sum(QTY) INTO SUM_OUTPUTQTY FROM V_DW_SALE_INVOICE WHERE V_DW_SALE_INVOICE.INVOICEDATE LIKE 'aaa%' AND P2=MENUFACTURER_ID AND P3=METERIELNAME AND P4 =SPEC AND P5=ORG_ID; the table V_D

  • Scroll 2 JScrollPanes together?

    Quick question. (I hope it's quick anyway.) I have 2 JTextAreas side by side added to JScrollPanes. I past a list in the one on the left, click a button to do something with that list and it writes to the JTextArea on the right like a log file. If th

  • Change Sales order Quantity after Billing

    Hi experts I m having the doubt in the follw'g scenario : Like I have created sales order>Delivery>Billing and Excise invoice. Now after this sales process completion i can able to change the Qty in sales order after Billing . I want to know how to c