Skip to Content
avatar image
Former Member

what is the meaning of the word "parser" in xml ?

what is the meaning of the word "parser" in xml ?

DATA: l_document TYPE REF TO if_ixml_document,

l_parser TYPE REF TO if_ixml_parser.

l_document = l_ixml->create_document( ).

l_parser = l_ixml->create_parser(

stream_factory = l_streamfactory

istream = l_istream

document = l_document ).

thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    May 31, 2006 at 07:53 AM

    Hi,

    A program that interprets the contents of an XML file and determines what to do with the input is a parser program.

    There are different kinds of parsers (SAX / DOM).

    Regards,

    Ravi

    Note : Please mark the helpful answers

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 31, 2006 at 09:38 AM

    Hi Dakota,

    The XML Parser for PL/SQL parses an XML document (or a standalone DTD) so that it can be processed by an application. Library and command-line versions are provided supporting the following standards and features:

    > DOM (Document Object Model) support is provided compliant with the W3C DOM 1.0 Recommendation. These APIs permit applications to access and manipulate an XML document as a tree structure in memory. This interface is used by such applications as editors.

    > SAX (Simple API for XML) support is also provided compliant with the SAX 1.0 specification. These APIs permit an application to process XML documents using an event-driven model.

    > Support is also included for XML Namespaces 1.0 thereby avoiding name collisions, increasing reusability and easing application integration.

    Check these links.

    http://help.sap.com/saphelp_nw04s/helpdata/en/67/fae9421dd80121e10000000a155106/frameset.htm

    http://help.sap.com/saphelp_nw04s/helpdata/en/bb/576643dca511d4990b00508b6b8b11/frameset.htm

    http://help.sap.com/saphelp_nw04/helpdata/en/86/8280d212d511d5991b00508b6b8b11/content.htm

    http://help.sap.com/saphelp_nw04s/helpdata/en/86/8280d512d511d5991b00508b6b8b11/content.htm

    http://help.sap.com/saphelp_nw04s/helpdata/en/bb/5766b2dca511d4990b00508b6b8b11/frameset.htm

    http://www.the-blue-orb.com/link/sap-db2/disk3/doc/86/8280d512d511d5991b00508b6b8b11/content.htm

    Here you can find a sample code.

    /people/r.eijpe/blog/2005/11/21/xml-dom-processing-in-abap-part-ii--convert-an-xml-file-into-an-abap-table-using-sap-dom-approach

    Regards,

    Susmitha

    Dont forget to reward points for useful answers.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 31, 2006 at 09:42 AM

    A parser is a sintactic analyser that checks if the XML document format is correct or not based on several conditions. You can use a parser in your own applications if you like to work with XML documents. Some of them checks the format and the whole document with a DTD and some others do not. The last ones checks if the tags are correctly closed or even if there is only one main tag at the beggining of the document.

    One example of the last one is

    <?xml version="1.0"?>

    <mydoc format="simple">

    <mytitle>titulo</mytitle>

    <main someatt="someval">

    <para>un parrafo</para>

    <para>segundo parrafo</para>

    <para>tercer parrafo</para>

    </main>

    </mydoc>

    The result would be

    mydocformat: simple

    mytitle

    titulo

    mainsomeatt: someval

    para

    un parrafo

    para

    segundo parrafo

    para

    tercer parrafo

    I hope this could be grateful

    Add comment
    10|10000 characters needed characters exceeded