Converting Results of SqlQueries to XML

Using XML we may represent relatively complex graph structure.
The same statement is true about SQL Queries that contains
joint conditions between different tables. My question is:
Is it possible to produce the XML document having the complex
graph structure using Java XML utility?
null

Thank you very much for your previous answer. But may I ask you
more specific question?
If you join two tables by some key using WHERE condition and in
SELECT statement mix data from both of them how do you decide
who is parent and who is child in XML file representation?
Oracle XML Team wrote:
: Fiterman Alexander (guest) wrote:
: : Using XML we may represent relatively complex graph
structure.
: : The same statement is true about SQL Queries that contains
: : joint conditions between different tables. My question is:
: : Is it possible to produce the XML document having the
complex
: : graph structure using Java XML utility?
: The XML SQL Utility for Java automatically
: renders in XML anything you can produce
: as a SQL statement in Oracle. If you can
: produce the SELECT statement (including over
: object view, object tables, structured types,
: etc) it will render it's structure naturally
: and automatically in XML.
: Steve Muench
: Oracle XML Team
: http://technet.oracle.com
: Oracle Technology Network
null

Similar Messages

  • XSLT Mapping to convert u201C.CSVu201D file into XML Structure.

    Hi All,
    I wanted to know can we use XSLT Mapping to convert u201C.CSVu201D file into XML Structure.
    I am communicating between two XI Systems. First XI system is going to give u201C.CSVu201D file as main document. I need to post IDOC Corresponding to this. So what I want to do is read this u201C.CSVu201D file (Main document in payload) and first convet it into XML and then use second mapping which will convert XML to IDOC.
    I know this is possible with JAVA Mapping but just wanted to confirm can we do this with XSLT mapping as well?
    Regards,
    Gouri

    Hi Amit,
    I know this way it shd work as i am able see other XSLT files. But this particular file is not visible.
    I am copying following code only in sample.xslt file.
    <xsl:stylesheet
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:fn="fn"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      version="2.0" exclude-result-prefixes="xs fn">
    <xsl:output indent="yes" encoding="US-ASCII" />
    <xsl:param name="pathToCSV" select="'file:///c:/csv.csv'" />
    <xsl:function name="fn:getTokens" as="xs:string+">
        <xsl:param name="str" as="xs:string" />
        <xsl:analyze-string select="concat($str, ',')" regex='(("["]*")+|[,]*),'>
            <xsl:matching-substring>
            <xsl:sequence select='replace(regex-group(1), "^""|""$|("")""", "$1")' />
            </xsl:matching-substring>
        </xsl:analyze-string>
    </xsl:function>
    <xsl:template match="/" name="main">
        <xsl:choose>
        <xsl:when test="unparsed-text-available($pathToCSV)">
            <xsl:variable name="csv" select="unparsed-text($pathToCSV)" />
            <xsl:variable name="lines" select="tokenize($csv, ' ')" as="xs:string+" />
            <xsl:variable name="elemNames" select="fn:getTokens($lines[1])" as="xs:string+" />
            <root>
            <xsl:for-each select="$lines[position() &gt; 1]">
                <row>
                <xsl:variable name="lineItems" select="fn:getTokens(.)" as="xs:string+" />
                <xsl:for-each select="$elemNames">
                    <xsl:variable name="pos" select="position()" />
                    <elem name="{.}">
                    <xsl:value-of select="$lineItems[$pos]" />
                    </elem>
                </xsl:for-each>
                </row>
            </xsl:for-each>
            </root>
        </xsl:when>
        <xsl:otherwise>
            <xsl:text>Cannot locate : </xsl:text><xsl:value-of select="$pathToCSV" />
        </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    </xsl:stylesheet>
    Is this correct?
    -Gouri

  • How to create ArrayColletion in mx:Script from mx:Model id="results" source="/data/data.xml" /

    How to create ArrayColletion in mx:Script from <mx:Model
    id="results" source="/data/data.xml" />
    Please see my code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Model id="results" source="/data/data.xml" />
    <mx:Script>
    import mx.collections.ArrayCollection;
    import mx.utils.ArrayUtil;
    import mx.controls.Alert;
    </mx:Script>
    <mx:ArrayCollection id ="dt1"
    source="{ArrayUtil.toArray(results.result)}"/>
    <mx:Script><![CDATA[
    [Bindable]
    public var expenses:ArrayCollection = dt1;
    [Bindable]
    public var expenses2:ArrayCollection = dt1;
    [Bindable]
    public var dp:ArrayCollection=expenses;
    public function changeDataProvider():void{
    Alert.show(expenses.toString());
    if (dp==expenses){
    dp=expenses2;
    }else{
    dp=expenses;
    ]]></mx:Script>
    <mx:Panel x="10" y="10" width="100%" height="378"
    layout="absolute">
    <mx:ColumnChart dataProvider="{dt1}" x="10" y="10"
    id="myChart" height="318" width="100%">
    <mx:horizontalAxis>
    <mx:CategoryAxis categoryField="month"/>
    </mx:horizontalAxis>
    <mx:series>
    <mx:ColumnSeries displayName="apple" yField="apple"/>
    <mx:ColumnSeries displayName="orange"
    yField="orange"/>
    <mx:ColumnSeries displayName="banana"
    yField="banana"/>
    </mx:series>
    </mx:ColumnChart>
    <mx:Legend dataProvider="{myChart}" x="481" y="10"/>
    </mx:Panel>
    <mx:Button x="284" y="416" label="Change Data" id="bt"
    click="changeDataProvider()" />
    </mx:Application>

    Tracy,
    Thanks. That worked. However I have another related question:
    I convert the xml feed to a XMLListCollection by doing:
    <mx:XMLListCollection id="mission"
    source="{xmlFeed.lastResult.day}"/>
    and
    <mx:XMLListCollection id="mission1"
    source="{xmlFeed.lastResult.day.tBlock}"/>
    On the chart I have
    <mx:ColumnChart id="missionReadiness" height="150%"
    width="100%"
    paddingLeft="2" paddingRight="2"
    showDataTips="true" dataProvider="{mission1}">
    <mx:series>
    <mx:ColumnSeries xField="" yField="@today"
    displayName="Today"/>
    <mx:ColumnSeries xField="" yField="@tomorrow"
    displayName="Tomorrow"/>
    <mx:ColumnSeries xField="" yField="@afterT"
    displayName="After Tomorrow"/>
    </mx:series>
    </mx:ColumnChart>
    the yField works, but for the xField I want to have the @date
    but refers to the parent node, so I am clueless on how to refer to
    it.
    Also, I would like to display on the chart only the values to
    a specific date (like @date="05/17/2007").
    Any suggestions on how to do that?
    Gilbert

  • HOW TO CONVERT PDF FILE IN TO XML FILE?

    HOW TO CONVERT PDF FILE IN TO XML FILE

    No Office programs can open a pdf and edit the contents so you will have to get a different app to convert teh pdf into xls format. There are plenty to be found on the web.
    Rod Gill
    The one and only Project VBA Book
    Rod Gill Project Management

  • Error when converting a numeric field to XML

    Hi,
            When i run the Adobe intractive form,i am getting following exception
    "Error when converting a numeric field to XML"
    Anyone plz suggest
    Regards,
    vinoth

    Hi Vinoth Raja,
    For resolving the following exception
    "Error when converting a numeric field to XML"
    You have to follow the below link:-
    http://www.saptechies.com/error-when-converting-numeric-field-xml/
    May be it will help you
    Regards,
    Sushma Yadav

  • Using XSL-XML template to convert name value pairs into XML elements

    Hi,
    I have a xml document in the format:
    <?xml version=”1.0”?>
    <body title="Mr" firstName="Joesph" middeNames="George Harry" lastname="Smith" countrycode="GBP"/>
    I need to convert this using a XSL-XML template in BI publisher to return XML in the following format, while doing some conversion, e.g. converting countrycode from GBP to UK:
    <?xml version=”1.0”?>
    <body>
    <title>Mr</title>
    <firstName>Joseph</firstName>
    <middleNames>George Harry</middleNames>
    <lastname>Smith</lastname>
    <countrycode>UK</countrycode>
    </body>
    Would appreciate if anyone could point me in the correct direction.

    Hi Sweta,
    Why MTB??? Message Transformation bean is used to change the format of the message... If you are planning to call any XSLT or java mapping through that then you can give it a try..
    >>how to get the last and first 3 special characters in the output text using MTB?
    Put them in message mapping itself and write it in File
    Regards
    Suraj

  • PeopleCode to "Save As" - convert an excel file to XML file

    All,
    Is there any way to convert an excel file to XML file via PeopleCode? I can manually "Save As" an excel file to be an XML file, but is there anyway of doing it via PeopleCode? I guess it would be a little possible via VBScript, but since by App server resides on a Unix box, that would not work.
    Any help would be really appreciated.
    Thanks,
    Mani

    The attached zip file contains several VI's to read and write directly to Excel using ActiveX. There are several example VI showing how to use everything. This set is saved in LabVIEW 6.0.2.
    I suggest you unzip these to your user.lib directory so you'll be able to easily access them from the functions palette.
    I have not actually used these, but others that have say they have worked well for them.
    Good Luck
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
    Attachments:
    excel_lv6i.zip ‏898 KB

  • Converting string(which is an xml from the java side) to xml in flex

    Hi,
       I have an xml from the java side which i send as string over amf. I need to convert this to xmllist or xml and bind it to a tree. Could some one help me in doing this. My label field needs to be displayName
    this is my xml that comes as string to the flex side
    <Menu>
      <MenuItem>
        <id>1</id>
        <displayName>Add</displayName>
        <menuList>
          <MenuItem>
            <id>3</id>
            <displayName>Form1</displayName>
            <menuList/>
          </MenuItem>
          <MenuItem>
            <id>4</id>
            <displayName>Form2</displayName>
            <menuList/>
          </MenuItem>
        </menuList>
      </MenuItem>
      <MenuItem>
        <id>2</id>
        <displayName>Delete</displayName>
        <menuList>
          <MenuItem>
            <id>5</id>
            <displayName>Form1</displayName>
            <menuList/>
          </MenuItem>
          <MenuItem>
            <id>6</id>
            <displayName>Form2</displayName>
            <menuList/>
          </MenuItem>
        </menuList>
      </MenuItem>
    </Menu>

    Well, for Binding you will probably need to further convert to XMLListCollection or ArrayCollection.
    Not sure.
    However, that is the way to convert String to XML.

  • Converting Java.util date to XML date in format YYYY-MMM-dd

    I'm using below code to convert java.util.date to XML date
    public static XMLGregorianCalendar toXMLDate(Date dte) {
       try {
       // this may throw DatatypeConfigurationException
       DatatypeFactory datatypeFactory = DatatypeFactory.newInstance();
       GregorianCalendar calendar = new GregorianCalendar();
       // reset all fields
      calendar.clear();
       Calendar parsedCalendar = Calendar.getInstance();
      parsedCalendar.setTime(dte);
      calendar.set( parsedCalendar.get(Calendar.YEAR ),
      parsedCalendar.get(Calendar.MONTH),
      parsedCalendar.get(Calendar.DATE ));
       XMLGregorianCalendar xmlCalendar = datatypeFactory.newXMLGregorianCalendar( calendar );
      xmlCalendar.setTimezone( DatatypeConstants.FIELD_UNDEFINED );
      xmlCalendar.setFractionalSecond( null );
       return xmlCalendar;
    I need to get the date in the format YYYY-MMM-dd, but it returns in a format YYYY-MM-dd. Can anyone tell me how can i change the format? Thanks

    >
    The snippet of ApplicationClient where the assignment took place and the syntax occurred were:
    1. DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
    2. DateFormat timeFormat = new SimpleDateFormat("HH:mm:ss");
    3. Date date = new Date();
    4. CustomerDetail customerDetail = new CustomerDetail();
    5. customerDetail.setCollectionDate(dateFormat.format(date)); //got the above syntax error
    6. customerDetail.setCollectionTime(timeFormat.format(date)); //got the above syntax error
    .....I am running JDK 1.6.0_10, Glassfish v2r2, MySQL 5.0, Netbeans 6.1 on Windows XP platform.The format method returns a String not a Date. Why not just store the Date as is without formatting, and format it when you want to retrieve it from the DB and display it?
    m

  • How can i convert flat idoc to IDOC-xml

    Hi all,
    I want to convert flat idoc to Idoc-xml. Suggest some methods for that....
    K.S Grewal

    This is the sample idoc data which i have been provided. actually i dont have much knowledge abt structure of idocs. As i have to test my scenario hich is idoc to file, i need Idoc-xml format.
    ISA00          00          01006922827PCE1  126155214895     0612211736U004000004633020P|GSRE006922827PCE16155214895200612211736463302X004010ST9440001W17F20061221018085336610001 398456   1*83209N1WHWarehouseG620920061221W0740EA*PO5500203183PL000010*1MT42PF5321D/37~N9KK0180853366000001N9PEUS1TWHSW1440~SE90001~ST9440002~W17F20061221018085336710001 398448   183209N1WHWarehouseG620920061221W0756EA*PO5500203182PL000010*1MT*42PF7421D/37N9KK0180853367000001~N9PEUS1TWHS~W1456SE90002ST9440003W17F20061221018085338810001 398446   1*83209N1WHWarehouseG620920061221W071EA*PO5500205659PL000010*1MT50PF9731D/37~N9KK0180853388000001N9PEUS1TWHSW141~SE90003~GE3463302~IEA1*000463302~

  • Convert the flat file to xml format.

    hi,
    I need to write a interface program in the R/3  to pull the flat file data from the unix application server and do some manipulation and place back into the unix application server in XML format, From the unix box XML file taken by the XI server.
    pls give me some idea to convert the flat file to XML format, through any function module or any other logic is there...
    with regards,
    Thambee.

    Hi Thambe
    in addition to the above posts
    Program to convert flat file to XML file.
    please download tool from this link:
    http://www.download.com/Stylus-Studio-2008-XML-Enterprise-Suite/3000-7241_4-10399885.html?part=dl-StylusStu&subj=dl&tag=button&cdlpid=10399885
    how to use:
    http://www.stylusstudio.com/learn_convert_to_xml.html
    http://www.sap-img.com/abap/sample-xml-source-code-for-sap.htm
    Flat file to XML
    CONVERTION OF FLAT FILE TO XML : NO OUT PUT FOUND
    Converting Idoc flat file representation to XML
    how to convert flat file into IDOC-XML
    Thanks
    sandeep sharma
    PS ; if helpful kindly reward points

  • Convertion of flat file to XML using DOM

    Hi!
    I need help for convert a flat file to XML using DOM and by taking the validation of a specified DTD. Can any body help me in this regard.
    Bye,
    lat

    first you have to decide how the flat file will map to xml. Will you use attributes or pcdata for your fields, or both? Will there be a hierarchy, or will it be mostly flat?
    Once decided, you'd probably just use a BufferedReader to read the lines one at a time, and generate Dom nodes as appropriate, and stick them in the tree.

  • How to Convert Oracle Apps Report into XML Publisher

    Hi
    How to Convert Oracle Apps Report into XML Publisher?
    Thanks

    In Brief :
    Re: XML Publisher
    In Details :
    http://www.oracle.com/technology/products/xml-publisher/docs/XMLEBSRep.pdf

  • Runtime Error For Converting Static pdf to Dynamic Xml Form pdf

    Hi All,
    I am converting my static pdf to dynamic xml form pdf using Adoble Livecycle Designer ES 8.2 it is giving runtime error dialog.
    My static pdf size is 12MB and it contains 46 pages(mostly all pages will have images). Do we have any limitations for converting static pdf to dynamic xml form pdf ?
    Error message image file is attatched to this thread.
    Can any body please help me on this.
    Advance Thanks
    Prasad Sagala

    Hi Paul,
    With out dividing into smaller chunks, Do we have any other alternative?
    Because in my other pdf reports having more than 50 pages (in between 100-600). If i want do divide smaller chunks it will be the long process.
    Thanks
    Prasad Sagala

  • How to convert HL7 file into an XML

    Hi All,
    I am new to HL7,can any one tell how to convert HL7 file into an XML.Give sample demo or related links.
    My sample HL7 file is as follows how can I convert.
    FHS|^~\&||Tax ID123^Lab Name123^L|||201110191435||HL7.txt||1234567|123||
    PID|seqno|123||john^chambers^^Dr^Dr|2456 california ave^San jose^CA^85254|19601212|M
    FHS|^~\&||Tax ID123^Lab Name123^L|||File Creaqted Date|File Security|FileName||File HeaderComment||Facility|FileCreatedDateTime|File Security|File Name|File Header Comment|FileControlId|Reference File Control ID|
    PID|seqno|patientId||LastName^FirstName^MiddleName^Title^Degree|Street^City^State^zip|patientDOB|gender
    <Report>
    <FileHeader>
    <FileSendingApplication> </FileSendingApplication>
    <TaxID>Tax ID123</TaxID>
    <LabName>Lab Name123</LabName>
    <FileSendngFacilityType>L</FileSendngFacilityType>
    <FileReceivingApplication></FileReceivingApplication>
    <FileReceivingFacility></FileReceivingFacility>
    <FileCreatedDateTime>201110191435</FileCreatedDateTime>
    <FileSecurity></FileSecurity>
    <FileName>HL7.txt</FileName>
    <FileHeaderComment></FileHeaderComment>
    <FileControlId>1234567</FileControlId>
    <ReferenceFileControlID></ReferenceFileControlID>
    <FileHeader>
    <Patient>
    <seqno> </seqno>
    <patientId>Tax ID123</patientId>
    <LastName>Lab Name123</LastName>
    <FirstName>L</FirstName>
    <MiddleName></MiddleName>
    <Title> </Title>
    <Degree></Degree>
    <Street></Street>
    <City></City>
    <State>HL7.txt</State>
    <Zip></Zip>
    <patientDOB>1234567</patientDOB>
    <gender></gender>
    <Patient>
    </Report>
    Thanks
    Mani

    Hi Prabu,
    With input as in single line I'm able to get the the output but with the multiple lines of input,error was occured.Any suggestions.
    Error while translating. Translation exception. Error occured while translating content from file C:\temp\sampleHL7.txt Please make sure that the file content conforms to the schema. Make necessary changes to the file content or the schema.
    The payload details for this rejected message can be retrieved.          Show payload...
    Thanks
    Mani

Maybe you are looking for

  • Maintain one PIR but for 2 different set of conditions

    Hi Expert, If i want to maintain PIR for material ABC, vendor 123, plant 1000 and purchase org 2000 but for this PIR i want to have more than one net price and order unit. In PIR i can only see there is one field to put the price in General view and

  • End User Roles Tab

    Hi all- I am beginning to implement the functionality behind the End User Roles Tab in SOLAR02 (i.e. creating training materials and learning maps). Does anyone have any good documentation on this functionality? Thanks

  • Photo Files using iPhoto

    I set up my laptop to have an account for me and another for my wife so we can have our own settings. We would like to share our photos. All of the photos that I have saved on to our laptop are only visible on my account. How to I set things up where

  • I am not allowed to download a free app from US iTunes  store

    I wanted to download free ABC News Iphone app from US store as its not avaliable in thr French one. I get a message stating my Apple Id doesn't allow ime to do so. How can I manage ? Thanks for your help. Jean.

  • When I try to set-up iCloud, I get error message "Verification Failed"?

    When I try to set-up iCloud, I get error message "Verification Failed - The certificate for this server is invalid. You may be connecting to a server that is pretending to be "setup.icloud.com" which could put your confidential information at risk."