It is possible to convert String to XMLDocument?

I use XML SQL Utility to generate an XML document from the results of a query. I want to apply XSLT on this xml document.
The problem is that XSU generates the document in String format. Or I use XSLProcessor.processXSL, and this method needs to parameters stylesheet and XMLDocument.
So, my question is :It is possible to convert String to XMLDocument?
Thanks.

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
Use getXMLDOM() instead of getXMLString() on the OracleXMLQuery object. This returns you a DOM representation instead of a string, avoiding parsing.<HR></BLOCKQUOTE>
Hi
I'm reading about how " generate an XML document from the results of a query" i exactly want to do this but i need to create the XML file not only generate it. How I "create" the XML file?. Because, I need to manipulate later my XML file.
Thanks for any help.
null

Similar Messages

  • Is it possible to convert ascii data in binary?

    Hi all.
    In my one table there is a column which contains ascii value. i want to convert it in binary. It it possible in oracle?
    eg field value:1250ÿ it should be 125011111111
    kindly tell how to do this.
    i have tried this using a simple java program but doesnot work for some ascii values.
    thank you

    I created two functions :
    create or replace FUNCTION dec2bin (N IN NUMBER) RETURN VARCHAR2 IS
    binval VARCHAR2(64);
    N2 NUMBER := N;
    BEGIN
    WHILE ( N2 > 0 ) LOOP
    binval := MOD(N2, 2) || binval;
    N2 := TRUNC( N2 / 2 );
    END LOOP;
    RETURN binval;
    END dec2bin;
    And other :
    create or replace function to_ascii( inSource IN VARCHAR2 )
    return varchar2 AS
    ResultString varchar2(381); -- 3 * possible length of source
    TempNumber number;
    begin
    for i in 1..length( inSource ) loop
    TempNumber := dec2bin ( ascii( substr( inSource,i,1 ) ) );
    ResultString := ResultString || trim( to_char(TempNumber,'00000009'));
    end loop;
    return ResultString;
    end;
    Now, in sqlplus : (just to show the binary string)
    column mybin for 9999999999999999999999999999999999999999
    SQL> select to_ascii('g') mybin from dual;
    MYBIN
    01100111
    SQL> select to_ascii('girish') mybin from dual;
    MYBIN
    011001110110100101110010011010010111001101101000
    SQL>Source:http://psoug.org/snippet/Convert-between-Decimal-Binary-Octal-and-Hex_536.htm
    http://www.dbforums.com/oracle/974944-converting-string-binary.html
    Is this you want or something else ?
    Regards
    Girish Sharma

  • Convert String variable value  to an Object referece type

    Hi all,
    I want to know that if there any possible way to convert String variable value to a Object reference type in java. I'll explain by example if this is not clear.
    Let's think that there is a string variable name like,
    String name="HelloWorld";
    and there is a class name same to the variable value.
    class HelloWorld
    I am passing this string variable value to a method which is going to make a object of helloworld;
    new convertobj().convert("HelloWorld");
    class convertobj{
    public void convert(String name){
    // in hert it is going to create the object of HelloWorld;
    // HelloWorld hello=new HelloWorld(); just like this.
    now i want to do this from the name variable value.( name na=new name()) like wise.
    please let me know if there any possible way to do that.
    I am just passing the name of class by string variable then i wanted to make a instance of the class which come through the variable value.
    thanx.

    Either cast the object to a HelloWorld or use the reflection API (Google it) - with the reflection API you can discover what methods are available.
    Note: if you are planning to pass in various string arguments and instantiate a class which you expect to have a certain method... you should define an interface and have all of your classes that you will call in this way implement the interface (that way you're sure the class has a method of that name). You can then just cast the object to the interface type and call the method.
    John

  • Its possible to convert Apple script to Java script

    Hi,
    Please Help me anyone to do that script.
    its possible to convert below mentioned Apple script to Java Script.
    Thanks in advance.
    Help me......!
    -yajiv
    Code:
    tell me to addImageLabels()
    on addImageLabels()
              tell application "Adobe InDesign CS5"
                        set numberAdded to 0
                activate
                        set enable redraw of script preferences to true
                        set currentFonts to (get name of every font)
                        if currentFonts does not contain fontname then
                                  display dialog "The font \"" & fontname & "\" is not active on your system." buttons {"Continue anyway", "Cancel"} default button 2
                        end if
                        tell document 1
      -- get a list of unique page IDs in this document
                                  set allpageids to my getPageIds()
                                  repeat with p from 1 to (length of allpageids)
                                            set pgid to item p of allpageids
      -- loop through these, getting a list of unique page item IDs to inspect
                                            tell page id pgid
                                                      set pageitems to (get id of every page item)
                                                      repeat with i from 1 to (length of pageitems)
                                                                set pid to item i of pageitems
                                                                tell page item id pid
                                                                          try
      -- certain boxes will fail to yield a content type, whatever
                                                                                    if content type is graphic type then
                                                                                              set c to class
                                                                                              set i to id
      -- get the name of the link, i.e. the filename, subject to labelFormat (full name, first six chars, etc.)
                                                                                              set gn to my getImageName(pgid, c, i)
                                                                                              if (gn is not "Empty") and (gn is not "") then
                                                                                                         set b to visible bounds
                                                                                                         set h to (item 3 of b) - (item 1 of b)
                                                                                                         set newtop to (item 1 of b) + (h / 2)
                                                                                                         set item 1 of b to newtop
                                                                                                         set w to (item 4 of b) - (item 2 of b)
                                                                                                         if w < minwidth then
                                                                                                                   set item 4 of b to ((item 4 of b) + 0.2)
                                                                                                                   set item 2 of b to ((item 2 of b) - 0.2)
                                                                                                         end if
                                                                                                         set l to (make new text frame at beginning of page id pgid with properties {visible bounds:b, fill color:fillcolor, contents:gn, label:"imagelabel"})
                                                                                                         tell l
                                                                                                                   tell paragraph 1
                                                                                                                             set justification to center align
                                                                                                                             try
                                                                                                                                       set applied font to fontname
                                                                                                                             end try
                                                                                                                             set point size to fontsize
                                                                                                                             set fill color to textcolor
                                                                                                                   end tell
                                                                                                                   set inset spacing of text frame preferences to ((insetspacing as string) & " in") as string
      fit given frame to content
                                                                                                                   set numberAdded to numberAdded + 1
                                                                                                         end tell
                                                                                              end if
                                                                                    end if
                                                                          end try
                                                                end tell
                                                      end repeat
                                            end tell
                                  end repeat -- allpageids
                        end tell -- document 1
      display dialog "Added " & numberAdded & " labels." buttons {okButton} default button 1 giving up after 10 with title scriptName
              end tell -- InDesign
    end addImageLabels
    on getPageIds()
              tell application "Adobe InDesign CS5"
                        tell document 1
                                  tell master spread 1
                                            set masterpageids to (get id of every page)
                                  end tell
                                  set docpageids to (get id of every page)
                        end tell
              end tell
              return masterpageids & docpageids
    end getPageIds
    on getImageName(int1, cla1, int2)
              tell application "Adobe InDesign CS5"
                        tell document 1
                                  tell page id int1
                                            if cla1 is rectangle then
                                                      set imagename to (name of item link of graphic 1 of rectangle id int2)
                                            else if cla1 is polygon then
                                                      set imagename to (name of item link of graphic 1 of polygon id int2)
                                            else
                                                      return "Unknown"
                                            end if
                                            try
                                                      if (labelformat is "First six characters") then
                                                                return (characters 1 thru 6 of imagename) as string
                                                      else if (labelformat is "Base name of linked file") then
                                                                set op to offset of "." in imagename
                                                                return (characters 1 thru (op - 1)) of imagename as string
                                                      else
                                                                return imagename
                                                      end if
                                            on error
                                                      return "Empty"
                                            end try
                                  end tell
                        end tell
              end tell
    end getImageName

    Yajiv:
    I realize English is probably not your first language, but you are not really making sense. Perhaps you could use more words and write in more detail.
    It seems you already have your script in AppleScript. Why do you need to convert it to JavaScript?
    It's going to be inconvenient at best and probably not worth anyone's time.
    Just use the AppleScript.

  • Converting String to byte array

    Hi,
    There is a code for converting String to byte array, as follows:
         public byte[] toByteArray(String s)
              char[] c = s.toCharArray();
              int len = c.length;
              byte[] b = new byte[len * 2];
    for ( int i = 0 ; i < len ; i++ )
         b[i * 2] = (byte)(c);
         b[(i * 2) + 1] = (byte)(c[i] >> 8);
    return b;
    But this isn't doing the conversion properly. For example, for the � (euro) symbol, it converts to some other unreadable symbol. Also, same is the case for square brackets. Any idea why this' so? What's wrong with the above code?
    The encoding format is UTF-8.
    Thanks.

    > In fact, I tried with String.getBytes() too, but leads to the same problem, with those specific symbols.
    Did you try the String.getBytes(String charsetName) method?
    Both methods have been around since Java 1.1.
    It's an extremely important skill to learn to read the API and become familiar with the tools you will use to program Java. Java has an extensive set of online documentation that you can even download for your convenience. These "javadocs" are indexed and categorized so you can quickly look up any class or method. Take the time to consult this resource whenever you have a question - you'll find they typically contain very detailed descriptions and possibly some code examples.
    Java� API Specifications
    Java� 1.5 JDK Javadocs
    Best of luck!
    ~

  • Is it possible to convert an app from 12c to 11g?

    I am using both 11.1.2.4 and 12.1.2.0.
    If I have an app built with 12.1.2.0, which does not include any 12c specific features, is it possible to convert it to 11.1.2.4?
    I am asking because I have a Development environment that is 12c, but a Production environment that is 11g and I am not sure we will be able to upgrade the Production environment
    Thanks in advance..

    It's possible but not an easy task. As 12c uses newer stuff you have to test everything with great care. You might find some things you have to rebuild add they won't work in 11.1.2.4.0 (e.g. components which are only available in 12c. If you read the what's new doc for 12c and you find something you have used, prepare to rebuild this part.
    First thing to try ids to open the project in 11.1.2.4.0 and see if you can compile and run the app.
    Timo

  • Is it possible to convert text captions to Smart Shapes?

    Hello,
    I have a collegue that is using Cp 5 to record software simulations which then need to be brought into Cp6. The problem is that our standards (for software simulations) employ Smart Shape call outs (not the Cp 5.5 and earlier text captions).
    Is it possible to convert these text captions into our themed Smart Shapes either automatically inside Captivate 6 or by modifying the content within the CPTx file?
    Thank you,
    Shawn

    Hello Lilybiri,
    As always you are awesome! :-)
    >I don't believe an automatic switch will be possible, because smart shapes are totally different objects.
    I understand because there are a huge variety of shapes in either format. But I suspect that it should be easy to convert a text caption from any style to one specified smart shape style.
    Actually, I am asking before the simulations get started. So nothing has been done yet. I am unsure what you are suggesting I should do in the preferences under Cp 5.5. Are you suggesting that there is a way to convert 'some format' of text callouts, in a Cp5.5 demonstration simulation, to Smart Shapes in Cp6?
    >but since you already have created the simulations, it has to be done manually. Hoping for you that
    >someone has a bright idea, but I do not see one immediately.
    For anyone else in this situation, it would be handy to have a solution (rather than painstakingly convert each manually).
    I am wondering if this might be a relatively easy search/replace within one of the xml files within the CPTx file. I'm going to look at this tonight.
    Thanks for your assist.

  • Not able to convert string attribute to number and date please help me out

    not able to convert string attribute to number and date attribute. While using string to date conversion it shows result as failure.As I am reading from a text file. please help me out

    Hi,
    You need to provide an example value that's failing and the date formats in the reference data you're using. It's more than likely you don't have the correct format in your ref data.
    regards,
    Nick

  • Is it possible to convert PDF file into HTML

    Dear friends
    Is it possible to convert PDF file into HTML. I have few hundread PDF files i like to convert this files into HTML. I hope it can be done through Java but i don't know how to start this coding. anybody can give me a brief idea to go ahead.

    Why do you want to do this yourself? I quick search on Google showed several utilities to do this, some freeware, some commercial.

  • Convert String to Date and Format the Date Expression in SSRS

    Hi,
    I have a parameter used to select a month and year  string that looks like:    jun-2013
    I can convert it to a date, but what I want to do is,  when a user selects a particular month-year  (let's say "jun-2013")
    I  populate one text box with the date the user selected , and (the challenge Im having is)  I want to populate a text box next to the first text box with the month-year  2 months ahead.    So if the user selects 
    jun-2013   textbox A will show  jun-2013 
    and textbox B will show  aug-2013..
    I have tried:
    =Format(Format(CDate(Parameters!month.Value  ),  
    "MM-YYYY"  )+ 2  )   -- But this gives an error
    This returns the month in number format   like "8"    for august...
    =Format(Format(CDate(Parameters!month.Value  ), 
    "MM"  )+ 2  )
    What is the proper syntax to give me the result    in this format =  "aug-2013"  ???
    Thanks in advance.
    MC
    M Collier

    You can convert a string that represents a date to a date object using the util.scand JavaScript method, and then format a date object to a string representation using the util.printd method. For more information, see:
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.1254.html
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.1251.html
    In your case, the code would be something like:
    var sDate = "2013-01-10";
    // Convert string to date
    var oDate = util.scand("yyyy-mm-dd", sDate);
    // Convert date to new string
    var sDate2 = util.printd("mm/dd/yyyy", oDate);
    // Set a field value
    getField("date2").value = sDate2;
    The exact code you'd use depends on where you place the script and where you're getting the original date string, but this should get you started.

  • Is it possible to convert to an AIFF file in itunes 10 and beyond, and if so what is the procedure?

    Hello.  Is it possible to convert to an AIFF file in itunes 10 and beyond, and if so what is the procedure? 
    I use FCP7 and often have a sound loop or the like that I need in AIFF format, I normally use itunes to do the conversion, but have heard that version 10 no longer performs this task...?
    Thx for the help!
    MBP 2.6 GHz Intel Core 2 Duo - Mac OS X 10.6.7 - itunes 9.2.1 (5)

    Doolittle wrote:
    I can't find convert to aiff as an option in itunes 10.
    It still works the same as in past releases.  Go to Edit > Preferences > Import Settings, and set "Import Using" to "AIFF Encoder," and then the option will be available.  Consult this document for details: 
    http://support.apple.com/kb/HT1550

  • How to convert string to an integer in SQL Server 2008

    Hi All,
    How to convert string to an integer in sql server,
    Input : string str="1,2,3,5"
    Output would be : 1,2,3,5
    Thanks in advance.
    Regards,
    Sunil

    No, you cannot convert to INT and get 1,2,3 BUT you can get
    1
    2
    3
    Is it ok?
    CREATE FUNCTION [dbo].[SplitString]
             @str VARCHAR(MAX)
        RETURNS @ret TABLE (token VARCHAR(MAX))
         AS
         BEGIN
        DECLARE @x XML 
        SET @x = '<t>' + REPLACE(@str, ',', '</t><t>') + '</t>'
        INSERT INTO @ret
            SELECT x.i.value('.', 'VARCHAR(MAX)') AS token
            FROM @x.nodes('//t') x(i)
        RETURN
       END
    ----Usage
    SELECT * FROM SplitString ('1,2,3')
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to convert String (dd-MMM-yyyy) to oracle.jbo.domain.Date

    Hi
    Could you please tell how do I convert String of date in format dd-MM-yyyy to ADF date? Please show me some sample.
    Thanks

    http://javaalmanac.com/egs/java.text/FormatDateDef.html
    Once you have a java.util.Date you can convert it to oracle.jbo.domain.Date. (see http://www.fifkredit.com/bc4jdoc/rt/oracle/jbo/domain/Date.html)

  • Is it possible to convert *.doc to *.rtf in a java program?

    Hi :-)
    My challenge is to develop a web-app in ADF Faces. Now i verify some technologies to store mailmerge letters in an easy way. The user of my web-app should upload a MS Word mailmerge document and a csv data source file. My web-app must thereupon convert this two files to a pdf per csv-row and store it to a ftp.
    I have build a demo using the open office API. But now i want to try the same by using apache POI and FOP. I can merge the doc files with POI and i can create PDF with FOP.
    My problem is, that POI cant convert to a rtf file and FOP uses an rtf file to create a pdf. I dont know, if its possible to convert a doc file to a rtf file. If its possible, is there an API, which will help me out?
    Regards
    Majo
    btw...I am not sure, if its the right forum for my question :-/

    HeHe, no sorry. The binary file is the same, because Windows bind doc and rtf with MS Word, it opens the file, which you have renamed to *.rtf in MS Word. But as a doc document, not as a rtf file ;-)
    And i dont want to open the rtf file in MS Word. I want to process the rtf file in java.
    Thanks
    Majo

  • I have acrobat 11 standard is it possible to convert pdf files to word files ?

    I have acrobat 11 standard is it possible to convert pdf files to word files ? or is it just possible in the Pro version.

    It sounds to me like you're using Reader, not Acrobat. Make sure you open
    the PDF file in Acrobat, and then go to File - Save As Other - Microsoft
    Word.
    On Thu, Mar 12, 2015 at 2:55 PM, nickk23435928 <[email protected]>

Maybe you are looking for

  • PO and SO Payment

    Hi I would like to pull payment information and the outstanding balance with regards to the PO and Sales orders. 1. What the table to be used? 2. What transaction can I verify that the reports is correct? Thank you in advance //psl

  • Passing value to a dynamic page from a pdk-java portlet

    Hi everyone. I'm quite new to portlets, so I'll try to present my problem as well as I can: I have a PDK-java portlet in which I read some information (like name, location) about user.It works ok.Now I want to use that infomation in another portlet,

  • New records not saved

    there are 3 main data block in a form. Block A is master of block B(multiple row block) while B is master of C(multiple row block). Initially, I enter 1 row in A, 1 row in B and 3 rows in C. So, 5 records are saved. Anyway, when I execute the form la

  • Withholding tax Ecs rounding problem

    Dear All, I have one issue when I am calculating the TDS. When Calculating the TDS Basic, surcharge, ECS and SEC has to be rounded off to their nearest value if it is below or above 0.50. But my case ECS is rounding off to 1 eventhough it is below 0.

  • ALE Idoc Change Pointers Question

    Though I selected Transfer Immediately on Partner Profile screen, why Idoc hasn't been generated and transmitted?. Why do I have run RBDMIDOC explicitely to pickup change pointers?. Appreciate your responses.