Xml, xsl, java and database

I have several xml documents that uses different tags to describe the same type of information. In my case they describe a row in a database table.
file1.xml
<therow>
<name>Jones</name>
<title>manager</title>
</therow>
file2.xml
<arow>
<employee>King</employee>
<job>manager</job>
</arow>
I want to use a technology for reading the content of the two files and generate a new document for each file that will use generic tags so the content of the new files could look like:
file1
<row>
<employeename>Jones</employeename>
<employeetitle>manager</employeetitle>
</row>
file2
<row>
<employeename>King</employeename>
<emplyeetitle>manager</employeetitle>
</row>
An then I can read this information by using a generic Java class and insert it into the database table..
I was told that the technology used for doing this was XSLT. I have been searching the web for examples and also tried to read some of the content in the Steve Muench book 'Building Oracle XML Applications'.
I have managed to create XSL files, but I would really appreciate if someone could show me a real example of how to do this, with the xml file, the xsl file, and a small java program to read this. Can anyone help?

Post your XSL files, otherwise we'd have to write them again.

Similar Messages

  • Help needed to converstae xml with java and database

    I want to make use of xml to read soem data from database and then use that material in java to display or manipulate that data and again feed back it into database through xml.

    why using XML? how about JDBC?

  • Diff between XSL - JAVA and XSL - ABAP

    Hi All,
    What is the difference between the XSLT in JAVA and XSL in ABAP? which is the preferable one.

    for
    <b>XSL in ABAP</b>
    refer these links
    /people/sap.user72/blog/2003/09/18/xsl-and-abap
    http://help.sap.com/saphelp_nw04/helpdata/en/09/b7463c32a3fe13e10000000a114084/frameset.htm
    /people/achim.bangert/blog/2005/07/17/code-generation-using-xsl-transformations
    /people/tobias.trapp/blog/2006/10/06/xml-processing-in-abap-part-9-150-abap-processing-using-xslt
    /people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
    for <b>XSL in JAVA</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/4c/b2ad3de2d76b3be10000000a114084/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14
    http://help.sap.com/saphelp_nw04/helpdata/en/ce/1d753cab14a909e10000000a11405a/frameset.htm
    XSLT Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    Java Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    Links of blogs on java mapping...
    /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
    Have a look at this blog on XSLT mapping in ccbpm:
    /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(file to xslt mapping)
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners(xslt with java enhancement function)
    XSLT Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    and article on XSLT Mapping
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi%20code%20samples/generic%20xslt%20mapping%20and%20sample%20code.pdf
    Java Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    Message Mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/ee/bf9640dc522f28e10000000a1550b0/content.htm
    this thread could give u a better understanding....
    https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FthreadID%3D40283%26tstart%3D25
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi(types of mappping in xi)
    /people/sap.user72/blog/2005/03/15/using-xslt-mapping-in-a-ccbpm-scenario(XSLT mapping in bpm)
    refer this thread
    Difference in using java,xslt,message mapping
    XSLT-transformation in Java-Mapping with javax.xml
    Thanks !!!!

  • Xml+Xsl +Java

    Hello
    I am looking for Java function which input are xml and xsl file and output is HTML file.
    Thanks in advance

    You need to use a Transformer, this will take in your XML and XSL and do the transformation.
    You need to write your XSL to create the HTML.
    XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type ="text/xsl" href='../configFF.xsl'?>
    <ThinClient page="openff">
    <Error>Error : Password authentication failed</Error>
    </ThinClient>
    XSL:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <xsl:template match="/">
    <HTML>
    <HEAD/>
    <BODY>
    <h2>Error Report</h2>
    Status:
    <xsl:value-of select="*/Error" />
    </BODY>
    </HTML>
    </xsl:template>
    </xsl:stylesheet>

  • Query resultset to xml using java and XML schema

    Hi,
    I query data using JDBC and I want to store it to an XML file which has a well defined XML schema. I searched a lot in the forum but did not find an answer. Please guide me to create this program.
    I have managed to use JDBC to get result set but I do not know how to export is to XML using XSD and Java.
    Please help.
    Regards,
    Ravi

    I have managed to use JDBC to get result set but I do
    not know how to export is to XML using XSD and Java.Export using XSD? Schemas are for validation.
    Iterate through the result set, and build up the XML stream by creating an entry for each row.
    Another way to do it is to load the ResultSet into a Java object and serialize that to XML using something like XStream.
    %

  • Java and database

    I want to develop an application software using java however i dont know which data base systems / software to use apart from mysql, and access. Is sql just a language or is it also a database software
    please help

    OK, that enough, but just to set the record straight. You said "SQL is a software too", no it is not. SQL is a language.
    http://en.wikipedia.org/wiki/SQL
    SQL (IPA: /&#716;&#603;s&#716;kju??&#712;&#603;l/ or /&#712;si??kw&#601;l/), commonly expanded as Structured Query Language, is a computer language designed for the retrieval and management of data in relational database management systems, database schema creation and modification, and database object access control management
    Some companies, such as Microsoft (not "windows"), make products, such as SQL server, with "SQL" in the title. But SQL Server is:
    Microsoft SQL Server 2005 is a comprehensive, integrated data management and analysis software
    http://www.microsoft.com/sql/prodinfo/overview/default.mspx

  • XML to Java and Back.

    hi
    I have a huge XML file (4 MB). I parsed it & put the data in a java object using SAX. its fast. Now I want to generate a XML file from java. I tried JAXB but it takes forever. Does anyone have any better idea?
    Thanks.

    Hi all,
    I know I am the millionth guy asking this question but can I know a great way to generate a XML from java?
    Thanks
    Sunil.

  • Writing XML from java and import this into OpenOffice

    Hello , i'd like to write a XML file which covers Text and Images and can be imported into OpenOffice. The Export to XML already works. But i don't know what XSL or other files a necessary ? Does anyone have a converter ? Or can gibe a clue ?

    dunno if it is feasable with only an XML file.
    i am doing this by generating an SXW file (OpenOffice) using JAXP for the XML content and java.util.zip to pack the XML and the images in the SXW.

  • XML to Java and back again

    Okay, I've seen this question asked many times and I don't see a lot of great solutions. I've been searching for the last hour and looked at xBeans, XMLBeans, xStream, you name it. Anyway, what I want to do is model my XML and Java objects (if I can't auto-generate the classes) and then at runtime the XML should be loaded directly into the data model. I know that writing a custom parser is old school and there are tools to do this for me but I can't seem to find what I need. What do you recommend for doing this?

    Check out the Commons Digester.
    The Digester package lets you configure an XML -> Java object mapping module, which triggers certain actions called rules whenever a particular pattern of nested XML elements is recognized.
    You can't get any better than this....in my opinion.
    Good Luck!

  • Oracle Open World 2012 - XML DB Presentations and Hands-on Labs

    Hereby following up on a small tradition, I think, I get going since 2006...an agenda overview of all things XMLDB you can do or see during this years Oracle Open World.
    Oracle Open World is the biggest IT conference nowadays in the world with 40.000+ thousand attendees and 1600+ sessions or workshops, so an overview regarding specific topics can be handy.
    If there is an update or something needs correction or added, please post it here.
    Regards
    Marco Gralike
    HOL10055 - Oracle XML DB Hands-On Lab
    ========================================================================================================================
    This hands-on lab provides an introduction to using Oracle XML DB and XQuery to store and manage XML content stored in Oracle Database.
    It introduces the different kinds of XML storage and indexing offered by Oracle XML DB and shows how to optimize XQuery operations on XML
    content by selecting the correct storage and indexing model. The lab also provides an introduction to the XML features available in the latest
    version of Oracle Database, including the new XQuery Update standard. And it shows how to take full advantage of the latest XQuery standards,
    such as XQuery Full-Text, to develop applications that combine the power of Full-Text and XML-based indexes
    BOF9908 - Oracle XML DB BOF
    ========================================================================================================================
    This session provides you with an opportunity to get answers to your questions about Oracle XML DB from the development team, product
    management team, acknowledged independent experts, and fellow Oracle XML DB users. The goal is to have an open and frank discussion
    about how to get the best out of all the features of Oracle XML DB. The session gives you a chance to establish personal contact with the
    people who have firsthand experience with developing and delivering systems that make use of Oracle XML DB
    CON8443 - Simple Content Management with Oracle XML DB and Database Native Web Services
    ========================================================================================================================
    This session demonstrates the power of the Oracle XML DB repository. You will learn how to automate the processing of documents stored
    in the Oracle XML DB repository, using repository events, and how to combine XML, PL/SQL, and database native Web services with Ajax and
    JavaScript to create simple, effective applications that leverage the full power of Oracle XML DB and the Oracle XML DB repository. The session
    focuses on a sample application, called XFiles, and shows how it was created with a combination of XML, XSL, JavaScript Ajax, and PL/SQL
    CON8440 - Managing XML Content with the Latest-Generation Oracle XML DB
    ========================================================================================================================
    This session introduces the latest generation of Oracle XML DB technology. XML standards continue to evolve, and Oracle XML DB continues
    to provide the industry’s leading implementation of those standards. The latest version of Oracle XML DB provides support for two new exciting
    XML standards, XQuery-Update and XQuery-Full Text. You will learn how to use XQuery, XQuery-Update, and XQuery Full-Text to develop
    powerful XML-centric applications. The session also demonstrates how to optimize XQuery Full-Text operations with Oracle’s new XML full-text
    index. The presentation also introduces Oracle’s new midtier XQuery engine and the XQJ API, which enables Java developers to access the full
    power of Oracle’s XML technology
    CON3148 - Integrating XML by Using Oracle SQL Developer 3.1 and Oracle Database 11g Release 2
    ========================================================================================================================
    Frequently during a project lifecycle, new technology is introduced that presents first-time challenges. This session describes a project using
    Oracle XML Database (Oracle XML DB) and discusses why Oracle XML DB was chosen, how it was used, and the technical issues encountered.
    The presentation covers several examples using XMLTYPE, CLOBs, Oracle XML DB methods, XMLAGG, XMLELEMENT, XMLFOREST, and
    dbms_xmldom. You will learn about methods, design considerations, and issues with Oracle XML DB. You will also take home working examples
    that you can copy and paste into your Oracle environment. Benefit from examples that use Oracle Database 11g Release 2 and Oracle SQL
    Developer 3.1.
    CON8442 - Design Guidelines and Performance Tuning for Storing XML in Oracle Database
    ========================================================================================================================
    This session examines techniques that can be used to optimize the performance of XML processing in Oracle XML DB. It looks at the different
    storage and indexing options and provides guidelines on when each should be considered. After establishing a framework for deciding how to
    store XML, the presentation considers the options available for indexing XML to ensure optimal performance of an XML-based application.
    The session also discusses how standard techniques such as partitioning and using parallel data manipulation language (PDML) can be used to
    scale XML processing on extremely large volumes of XML content and how Oracle XML DB can leverage the intelligent storage capabilities of
    Oracle Exadata.
    DEMOGROUNDS (Moscone South)
    XML Application Development: Oracle XML DB, Oracle XML Developer Kit
    ========================================================================================================================
    Oracle XML Database provides a high-performance, native XML storage and retrieval technology. It fully absorbs the W3C XML data model into
    the Oracle Database, and provides new standard access methods for navigating and querying XML. With Oracle XML Database, you get all the
    advantages of relational database technology plus the advantages of XML. Come and learn how to develop applications that take advantage
    of Oracle's XML technology and the Oracle XML DB Repository.
    Oracle XML Database: Structured, Semistructured, and Unstructured XML
    ========================================================================================================================
    Oracle XML Database provides a high-performance, native XML storage and retrieval technology. It fully absorbs the W3C XML data model into
    the Oracle Database, and provides new standard access methods for navigating and querying XML. With Oracle XML Database, you get all the
    advantages of relational database technology plus the advantages of XML. Come and learn how to develop applications that take advantage
    of Oracle's XML technology and the Oracle XML DB Repository.Oracle's OOW 2012 Content Catalog: https://oracleus.activeevents.com/connect/search.ww?event=openworld (use "XML DB" or "XMLDB" as search tag)
    Edited by: user10212268 on Aug 13, 2012 5:10 AM

    Other resources are also on linkedin http://www.linkedin.com/groups/Oracle-XMLDB-3282943 to keep you updated.
    M.

  • 3 tiers model with Java and Oracle.

    Hi everybody. I have a problem with my work. I want to design a simple program follow 3 tiers model with Java and database is Oracle. But I do not know how I can design them. Please help me. It will better if you give some source code for each layer.
    Thanks in advance.
    Ky Thanh.

    I'd suggest searching the net for tutorials. Pick out the things you don't know about and need to know (SQL? JDBC? Java? software design in general?) and google: tier architecture, sql tutorial, etc. Sun's Java & JDBC tutorials are at http://java.sun.com/learning/tutorial/index.html
    Source for each tier? Read the JDBC tutorial and you can write the database tier source yourself. Learn Swing/Servlets/whatever you use for the user interface and you can write the top tier. The middle tier is your business logic, which is dependent on your area of business, and you'll need to know about the business and just general programming. Then if the tiers need to be distributed (hopefully not), you'll need to learn EJB or something.
    I hope you haven't been given a task there you aren't ready to take on... Learning to swim by jumping into the river is a great way to learn in a school assignment, but you mention work, and learning that way at work sounds a bit risky to me.

  • Xml, xsl and database

    I have several xml documents that uses different tags to describe the same type of information. In my case they describe a row in a database table.
    file1.xml
    <therow>
    <name>Jones</name>
    <title>manager</title>
    </therow>
    file2.xml
    <arow>
    <employee>King</employee>
    <job>manager</job>
    </arow>
    I want to use a technology for reading the content of the two files and generate a new document for each file that will use generic tags so the content of the new files could look like:
    file1
    <row>
    <employeename>Jones</employeename>
    <employeetitle>manager</employeetitle>
    </row>
    file2
    <row>
    <employeename>King</employeename>
    <emplyeetitle>manager</employeetitle>
    </row>
    An then I can read this information by using a generic Java class and insert it into the database table..
    I was told that the technology used for doing this was XSLT. I have been searching the web for examples and also tried to read some of the content in the Steve Muench book 'Building Oracle XML Applications'.
    I have managed to create XSL files, but I would really appreciate if someone could show me a real example of how to do this, with the xml file, the xsl file, and a small java program to read this. Can anyone help?

    follow up on http://forum.java.sun.com/thread.jspa?threadID=608775&tstart=0

  • Guided research with Java and XML

    Hi all,
    I'm a last year student and now I have to choose a topic for my Guided Research Project.
    My interest in XML and databases pushes me in this direction. However, I still cannot come up with an interesting proposal for the project. At first I considered implementing a "XML <-> databaseSchema" converter, but then I found out that many similar tools already exist. I have background in Java, PHP and mysql which could be useful.
    I was wondering if you could give me an idea about a possible topic.
    Thank you very much!
    Regards,
    J

    For parsing you can use SAX Parser and for document generation you can use DOM Parser.

  • Java and xml option necessary?

    Hi,
    first when i build the repository database, i choose java and xml option, is this necessary or i waste my time.
    When i read Building a Help Desk Connector, i'm not sure, do i need the Diagnostic Pack.
    Best regards
    Thomas
    (Narri, Narro)

    This is the defacto site for xpath stuff for java
    http://xml.apache.org/xalan-j/

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

Maybe you are looking for

  • Uploading a CSV file

    When I try to upload a CSV file in my program it gives me an error message - Do not have an E-mail address column even though I do have an E-mail column and a list of E-mail addresses. How can I resolve this problem?

  • IDOC Error - Error Passing the IDOC

    Dear Experts,              I had a <removed by moderator> problem while saving the invoice.             In my case, IDOC is created and Status is shown as 03 (Data Passed to port OK), But the file is not written in Application server. In the status r

  • IPhoto '11: Export (JPEG) size not working

    I keep all my photos taken with iPhone 4 in iPhoto '11 ver 9.42 (710.42). It is a very excellent app to mange my photos. Recently I need some photos from iPhoto for the use in my web project. So I export them in JPEG, choosing "high" quality and "lar

  • F-47 withhold tax user exit

    Hi all,   Please specify the user exit for withhold tax in f-47 Thanks & Regards, padmaja

  • HDV: best export format for client viewing?

    I am working on a project in HDV 1080i (1440). What is the best export format to create a sample for a client to view- one that will give the proper aspect ratio. I've tried everything I can think of, and the export is still squashed 1440 and not ful