How to access xml file using c

how to access xml file using c. are there any libraries regarding xml fastinfoset in c? Please let me know about any resources if u know? thanks!!!
samitha

There are different methods to access XML data which have pro's and cons. Let us know more about what you want to do and we can help you.

Similar Messages

  • How to update XML file using XSLT

    Hi there,
    I have a "small" issue with exporting data to an XML file using XSLT.
    A two steps process is needed to import data from a non-hierarchical XML file into ABAP, change the data, and then update the XML file with new values. The problem is not trivial, since the format of the XML file is a complex one: there are many interdependent elements on the same level, pointing to each other by using id and ref attributes. Based on these values the data can be read and written into an internal table. I use XSLT and XPath for that. So the inbound process is done and seems to work correctly. I have to mention that the file contains much more data than I need. I am working only with a small part of it.
    Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT? I can pass only the internal table to the transformation, so how do I access the XML file in order to update it? I have tried to use the <B>xsl:document()</B> function to access the content of the file store locally on my PC, but it fails each time by throwing and URI exception. I have tried the absolute path without any addition and the path with the file:/// addition. Same result. Please advise.
    Many thanks,
    Ferenc
    P.S. Please provide me with links only if they are relevant for this very matter. I will not give points for irrelevant postings...

    Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT?
    XSLT approach:  check these online tutorial
    http://www.xml.com/pub/a/2000/08/02/xslt/index.html
    http://www.xml.com/pub/a/2000/06/07/transforming/index.html
    ABAP approach:
    for example you have the xml (original) in a string called say xml_out .
    data: l_xml  type ref to cl_xml_document ,
            node type ref to if_ixml_node  .
    create object l_xml.
    call method l_xml->parse_string
      exporting
        stream = xml_out.
    node = l_xml->find_node(
        name   = 'IDENTITY'
       ROOT   = ROOT
    l_xml->set_attribute(
        name    = 'Name'
        value   = 'Charles'
        node    = node
    (the above example reads the element IDENTITY and sets attribute name/value to the same)
    like wise you can add new elements starting from IDENTITY using various methods available in class CL_XML_DOCUMENT
    so how do I access the XML file in order to update it?
    you have already read this XML into a ABAP variable right?
    Sorry couldnt understand your whole process, why do you need to read local XML file?
    Raja

  • How to read XML file using Automatic ref No

    I need to get the data from the xml file using Automatic reference No.I am a beginner .help me out

    Hi Parthipan,
    An easy way to get started with using XML in LabVIEW is a toolkit called EasyXML -- it's a product from JKI that I helped create
    Thanks,
    -Jim

  • How to access XML files inside IDML?

    Hi All,
    How to access the different XML files like designmap, story, masterspread, etc. found inside the IDML files?
    Pl. help.
    Thanks,
    Praveen

    An External Library DC is only intended to include jars. Using a Java DC may be a better idea, unless you put your xml files into a jar first (but you'd need a Java DC for that...).

  • How to get XML file using servlets that XI sent to my J2EE appl?

    Hi All!
    I have a scenario like XI sends xml file to j2ee application. In my J2EE application my servlet receives this xml. Will the xml file be in my HTTPServletRequest object? if so how to get that file from Request object.
    Please help me its urgent, Any code help is highly appreciated.
    My xml file will be like this:
    <ns0:Http_Message_Type_Demo
    xmlns:ns0="http://abcdemo.com">
    <Name>ABC</Name>
    <RollNo>123</RollNo>
    <Address>a-4</Address>
    </ns0:Http_Message_Type_Demo>
    somebody should help me!please
    Thanks

    Hi,
    You can use HTTPServletRequest object to get the XML payload.
    BufferedReader reader = request.getReader(); //gets XML payload
    String line = reader.readLine(); // to read the XML payload line by line
    (request is the HTTPServletRequest object)
    Regards,
    Uma

  • How to access XML files on public part of an external library DC?

    Hi,
    I would like to put xml and xsd files into a public part of an external library DC, so that I can access these files within other DCs. But I don't know the path which I have to use in the other DCs, e.g. for creating a File object from such xml or xsd files. What do I have to do to get this running?
    I'm using NetWeaver CE 7.2 for Java.
    Thanks in advance for your help!

    An External Library DC is only intended to include jars. Using a Java DC may be a better idea, unless you put your xml files into a jar first (but you'd need a Java DC for that...).

  • How to generate XML file using select files manually option in MOPz

    Hi Guru's!
    Can someone tell me how can I generate XML file not using the calculate automatically option but using select files manually. thanks!

    Hi Maix,
    You may manually add the files into download basket and then approve it.
    Use the SCN document below for the steps.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10b14f0c-b9af-2e10-ba83-f05ebcfbc3c2?QuickLink=index&…
    Hope this helps.
    Regards,
    Deepak Kori

  • How to access Remote File using File Services or Servlet

    Hi Friends,
    I want to access a file from a remote location. How to do that ?
    I tried to display an image in my client application. The image source is from remote location. I tried with URL, is there any other way to read/write remote resources through secured connection with some encryption and decryption techniques.
    Kindly help me out !!!
    Regards,
    V.Prasanna

    whelp, If you map the drive then the url thing should work. Other then that I don't know. I normally map the drive.

  • How to generate XML file using EJB ?

    Hi
    Cab anyone point me towards some good examples which creates xml file for the data extracted using EJBs .I have rough idea that this could be done with DOM/JDOm but need some goos example .
    Also I have J2EE RI server,Xalan/Xerces ....Do I need to download DOM/JDOM APIs separately...
    I am relatively new to J2EE .
    Thanks
    Ash

    http://www.theserverside.com/home/index.jsp
    J2EE and XML Development PDF
    Dave

  • Problem in accessing XML files using Web Start

    Hello,
    I am trying to run a swing based application, for which I am using Java Web Start. I have 3 jar files. One is ma_ui.jar which contains all my class files. 2nd is config.jar which contains all my xml and other image files. 3rd is classes111.zip for database access. When I try to run this application, the error it shows is application.xml is not in the classpath. But I am sure that application.xml is there in the config.jar. Can anybody help me out.
    Thanks and Regards
    Suneet

    It would help if you include a copy of your jnlp with this post.

  • How to access a file using Applet?

    Dear all,
    I would like to use an applet to read and display information on server side, but there still a fileaccess permission denied, what can i do?
    The idea of the web service is like that::
    1.User connected to a webpage, than they can choose the file and then,
    2. the file name will be transfered into the applet (using applet><param> tags etc.)
    3. THe applet read and displays information.
    In addition, the file is placed at server side, should I set the "./hotjava/ properties "

    Maybe you should sign your applet.
    You'll find further information in the Signed Applets Forum:
    http://forum.java.sun.com/forum.jspa?forumID=63

  • How to validate XML files using several XSD?

    hi friends i need java code for this application >?
    Plz. help me urgent............

    Use the parser property
    http://apache.org/xml/properties/schema/external-schemaLocation
    to specify more than one schemas.
    http://xerces.apache.org/xerces2-j/properties.html

  • Reading XML file using BAPI and then uploading that xml file data into SAP

    I am getting a xml file from Java server. I need to take
    data from this file using BAPI and need to upload into SAP using SAP.
    Please tell me how to read XML files using BAPI's.

    <b>SDIXML_DATA_TO_DOM</b> Convert SAP data (elementary/structured/table types) into DOM (XML
    <b>SDIXML_DOM_TO_XML</b>  Convert DOM (XML) into string of bytes that can be downloaded to PC or application server
    <b>SDIXML_DOM_TO_SCREEN</b> Display DOM (XML)
    <b>SDIXML_DOM_TO_DATA</b>
    data: it_table like t001 occurs 0.
    data: l_dom      TYPE REF TO IF_IXML_ELEMENT,
          m_document TYPE REF TO IF_IXML_DOCUMENT,
          g_ixml     TYPE REF TO IF_IXML,
          w_string   TYPE XSTRING,
          w_size     TYPE I,
          w_result   TYPE I,
          w_line     TYPE STRING,
          it_xml     TYPE DCXMLLINES,
          s_xml      like line of it_xml,
          w_rc       like sy-subrc.
    start-of-selection.
      select * from t001 into table it_table.
    end-of-selection.
    initialize iXML-Framework          ****
      write: / 'initialiazing iXML:'.
      class cl_ixml definition load.
      g_ixml = cl_ixml=>create( ).
      check not g_ixml is initial.
      write: 'ok'.
    create DOM from SAP data           ****
      write: / 'creating iXML doc:'.
      m_document = g_ixml->create_document( ).
      check not m_document is initial.
      write: 'ok'.
      write: / 'converting DATA TO DOM 1:'.
      CALL FUNCTION 'SDIXML_DATA_TO_DOM'
        EXPORTING
          NAME               = 'IT_TABLE'
          DATAOBJECT         = it_table[]
        IMPORTING
          DATA_AS_DOM        = l_dom
        CHANGING
          DOCUMENT           = m_document
        EXCEPTIONS
          ILLEGAL_NAME       = 1
          OTHERS             = 2.
      if sy-subrc = 0.  write  'ok'.
      else.             write: 'Err =', sy-subrc.
      endif.
      check not l_dom is initial.
      write: / 'appending DOM to iXML doc:'.
      w_rc = m_document->append_child( new_child = l_dom ).
      if w_rc is initial.  write  'ok'.
      else.                write: 'Err =', w_rc.
      endif.
    visualize iXML (DOM)               ****
      write: / 'displaying DOM:'.
      CALL FUNCTION 'SDIXML_DOM_TO_SCREEN'
        EXPORTING
          DOCUMENT          = m_document
        EXCEPTIONS
          NO_DOCUMENT       = 1
          OTHERS            = 2.
      if sy-subrc = 0.  write  'ok'.
      else.             write: 'Err =', sy-subrc.
      endif.
    convert DOM to XML doc (table)     ****
      write: / 'converting DOM TO XML:'.
      CALL FUNCTION 'SDIXML_DOM_TO_XML'
        EXPORTING
          DOCUMENT            = m_document
        PRETTY_PRINT        = ' '
        IMPORTING
          XML_AS_STRING       = w_string
          SIZE                = w_size
        TABLES
          XML_AS_TABLE        = it_xml
        EXCEPTIONS
          NO_DOCUMENT         = 1
          OTHERS              = 2.
      if sy-subrc = 0.   write  'ok'.
      else.              write: 'Err =', sy-subrc.
      endif.
      write: / 'XML as string of size:', w_size, / w_string.
      describe table it_xml lines w_result.
      write: / 'XML as table of', w_result, 'lines:'..
      loop at it_xml into s_xml.
        write s_xml.
      endloop.
      write: / 'end of processing'.
    end of code
    Hope this will be useful.
    regards
    vinod

  • How to read XML file kept on NON-SAP server using the Http URL ?

    Dear Experts,
    I am working on CRM2007 web UI. I need to read a XML file placed on a shared server location by a third party program. Then process that XML file into CRM and create a quotation using the data extracted from the file.
    All i have with me is the http URL that points to the location of the file.
    I am supposed to read the file , create quotation and at later point of time i would be asked to update the quotation and then generated new XML representing updated quotation and replace the XML file on shared server location with this new updated XML file.
    I know how to extract data from XML file into ABAP but i have no clue as to how to access the file on some other server using the http url i have and how to read it ?
    I searched on the forum and i found the codes for reading XML file that is located either on client machine OR on the Application server wheareas my file is on some other than sap application server.
    Please help me as its an urgent issue .
    Points will be rewarded for sure.
    Please help.
    Thanks in advance,
    Suchita.
    p.s. : the http url to the file location is like -->
    http://SomeServerDomain/SomeDirectory/file.xml

    hi,
    interesting task.
    to request the file by a http call you need to create an if_http_client object.
    More info is [here|http://help.sap.com/saphelp_nwmobile71/helpdata/en/e5/4d350bc11411d4ad310000e83539c3/frameset.htm]
    to parse the file you either have to work with the ixml packages ([info|http://help.sap.com/saphelp_nwmobile71/helpdata/en/47/b5413acdb62f70e10000000a114084/content.htm]) or you use an XSLT transformation ([info|http://help.sap.com/saphelp_nwmobile71/helpdata/en/a8/824c3c66177414e10000000a114084/content.htm]).
    uploading the final file isn't so easy. if you only have http, you should write a server script to allow uploading of the new file and copying it into the place of the old file. but you definitely need the script.
    now it's your take. depending on how experienced you are in ABAP and networking this might turn out to be easy or pretty complicated.
    have fun,
    anton

  • I used a partitioned HDD for time machine, using a partition already containing other data files. I am now no longer able to view that partition in Finder. Disk Utility shows it in grey and "not mounted". Any suggestions of how to access the files?

    I used a partitioned HDD for time machine, using a partition already containing other data files. I am now no longer able to view that partition in Finder. Disk Utility shows it in grey and "not mounted". Any suggestions of how to access the files? Does using time machine mean that that partition is no longer able to be used as it used to be?
    HDD is a Toshiba 1TB, partitioned into two 500GB partitions.
    OS X version 10.9.2

    Yes, sharing a TM disk is a bad idea, and disks are cheap enough so that you don't need to.
    Now
    Have you tried to repair the disk yet

Maybe you are looking for