Metadata in xml files

I'm using the XMP toolkit successfully in several graphics files that support metadata.  I'm trying to find a solution for files that don't support it (e.g. Bmp files). One solution is to create an xml file with the same name as the original graphic file and use that file to store and retrieve metadata. For example: the metadata file for test.bmp will be test.bmp.xml.  <br /><br />The xml file to start with is very simple:<br /><?xml version="1.0"?><br /><Root/><br /><br />However, the call to CanPutXmp fails with this file.  Any suggestions?

hi,
im trying to use xmp toolkit for adding metadata to a jpeg file, i didn't get any idea about that, will you tell me how or will you show me the sample code? this will be very much useful for me.
thanks and regards

Similar Messages

  • Script to convert metadata to xml file - Bridge CS6/InDesign CS6

    I need a script that will convert metadata in Bridge to an xml file I can import into InDesign so that when I export long documents the alt text for photos is already included with the images.  
    Two problems -
    1) I need the scripting for dummies version - from step 1 to end.  I have zero experience with using scripts, as in - did not know they existed until a few days ago. 
    2) If the script needs adapted - see #1; there is very little hope that I will have any idea of how to do that without assistance. 
    I will be grateful for any assistance!!  I do want to learn how to do this, if I can. 

    I need a script that will convert metadata in Bridge to an xml file I can import into InDesign so that when I export long documents the alt text for photos is already included with the images.  
    Two problems -
    1) I need the scripting for dummies version - from step 1 to end.  I have zero experience with using scripts, as in - did not know they existed until a few days ago. 
    2) If the script needs adapted - see #1; there is very little hope that I will have any idea of how to do that without assistance. 
    I will be grateful for any assistance!!  I do want to learn how to do this, if I can. 

  • How can I convert the metadata tags on my mp4s to xml files so that they can be read in Windows Media Center?

    I have a library with almost 3000 movies and TV shows that I have fully tagged. However, I have decided to start using Windows Media Center and it does its metadata tagging through XML files.  I wanted to know if anyone could tell me if there was a way to extract the metadata from those mp4s and convert them to a format that WMC could read?  Thanks!!!!

    iTunes can make XML playlists so it might be all you need, I made a simple one file playlist and exported it from iTunes. The result is shown below. In principle I could delete the playlist and the entry from the library, as long as I don't delete the file, then later reimport the XML playlist file. I haven't tested this particular scenario, but I assume that iTunes will read all the properties as listed unless it can read some kind of tag from the file itself in which case the current value of the tag would take precedence.
    What I don't know is what media center would make of this file, or what its files look like, however assuming they have a similar structure that can be decoded then it should be possible to read data from the iTunes library and write out a text file that will make sense to media centre.
    Video Test.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Major Version</key><integer>1</integer>
    <key>Minor Version</key><integer>1</integer>
    <key>Date</key><date>2013-09-26T23:30:26Z</date>
    <key>Application Version</key><string>11.1</string>
    <key>Features</key><integer>5</integer>
    <key>Show Content Ratings</key><true/>
    <key>Music Folder</key><string>file://localhost/E:/iTunes/iTunes%20Media/</string>
    <key>Library Persistent ID</key><string>CCF046191585EA85</string>
    <key>Tracks</key>
    <dict>
    <key>155170</key>
    <dict>
    <key>Track ID</key><integer>155170</integer>
    <key>Name</key><string>Abbott &#38; Costello: "Two Tens For A Five" &#38; "Who's On First"</string>
    <key>Artist</key><string>Abbott &#38; Costello</string>
    <key>Album Artist</key><string>Abbott &#38; Costello</string>
    <key>Album</key><string>Abbott &#38; Costello: "Two Tens For A Five" &#38; "Who's On First"</string>
    <key>Genre</key><string>Comedy Clip</string>
    <key>Kind</key><string>MPEG-4 video file</string>
    <key>Size</key><integer>110483524</integer>
    <key>Total Time</key><integer>532096</integer>
    <key>Year</key><integer>1950</integer>
    <key>Date Modified</key><date>2013-06-19T17:35:18Z</date>
    <key>Date Added</key><date>2012-12-01T17:30:57Z</date>
    <key>Bit Rate</key><integer>156</integer>
    <key>Comments</key><string>www.dvdvideosoft.com</string>
    <key>Artwork Count</key><integer>1</integer>
    <key>Persistent ID</key><string>5AF2C490D1E065CD</string>
    <key>Track Type</key><string>File</string>
    <key>Has Video</key><true/>
    <key>HD</key><false/>
    <key>Video Width</key><integer>1136</integer>
    <key>Video Height</key><integer>640</integer>
    <key>Location</key><string>file://localhost/E:/iTunes/iTunes%20Media/Home%20Vide os/Abbott%20&#38;%20Costello_%20_Two%20Tens%20for%20a%20Five_%20&#38;%20_Who's%2 0on%20First_.mp4</string>
    <key>File Folder Count</key><integer>3</integer>
    <key>Library Folder Count</key><integer>1</integer>
    </dict>
    </dict>
    <key>Playlists</key>
    <array>
    <dict>
    <key>Name</key><string>Video Test</string>
    <key>Playlist ID</key><integer>1930541</integer>
    <key>Playlist Persistent ID</key><string>30BF2769C94F7F29</string>
    <key>All Items</key><true/>
    <key>Playlist Items</key>
    <array>
    <dict>
    <key>Track ID</key><integer>155170</integer>
    </dict>
    </array>
    </dict>
    </array>
    </dict>
    </plist>
    Such files are easier to interpret if opened with Notepad++.
    tt2

  • Embedding data from xml file into metadata of a pdf

    Hi All
    I'm wanting to do the following, but struggling to figure the right way to go about it.
    I want to embedded data from my MIS into a pdf's metadata (as scrnshot). I can create a standalone xml file with all the data I require, but I'm unsure how to automate that being embedded into a pdf's advanced metadata. I know this can be done, as it worked at a previous employer, but I didn't get chance to find out how they did it.
    I'm wanting to do this so I can carry out a more advanced search of the metadata in Bridge.
    Any advice would be appreciated!

    Hi Northern,
        I have modified the modifyingXMP sample for you. After this change, put your xmp file as sample.xml and also put pdf file in the same folder where ModifyXMP executable is. After merging my changes, ModifyXMP file will read the sample.xml and will embed it into pdf file.
       Please follow the following steps
    1. Download XMPToolkit SDK and follow the steps to compile Sample
    2. Open ModifyingXMP file, replace all the content of that file with the below content
    3. Compile the ModifyingXMP file.
    4. The ModifyXMP.exe will be generated in folder (samples\target\windows\Debug), if you have changed the output folder it will be generated there.
    5. In parallel to ModifyingXMP.exe put the sample.xml (the xml file you have) and also the pdf file (say pdf file name is mypdf.pdf)
    6. Go to console and change directory to the directory where ModifyingXMP is and pass the following command
    ModifyingXMP mypdf.pdf
    7. Open the pdf file and check that value/properties
    For your reference, I am putting the content of the sample.xml file too, put this content in sample.xmp and any pdf and you will find subject field is getting added.
    ************** content of the sample.xml file. Create a file name sample.xml and put that content. Put sample.xml in parallel to ModifyingXMP.exe*******
    <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
        <rdf:Description rdf:about='' xmlns:dc='http://purl.org/dc/elements/1.1/'>
            <dc:subject>
                <rdf:Bag>
                    <rdf:li>XMP</rdf:li>
                    <rdf:li>SDK</rdf:li>
                    <rdf:li>Sample</rdf:li>
                </rdf:Bag>
            </dc:subject>
            <dc:format>image/tiff</dc:format>
        </rdf:Description>
    </rdf:RDF>
    ******************* MODIFIED CONTENT OF MODIFYING.CPP FILE. ***************************************************************************************** ************
    // ========================================================================================= ========
    // Copyright 2008 Adobe Systems Incorporated
    // All Rights Reserved.
    // NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the terms
    // of the Adobe license agreement accompanying it.
    // ========================================================================================= ========
    * Tutorial solution for Walkthrough 2 in the XMP Programmers Guide, Modifying XMP
    * Demonstrates how to open a file for update, and modifying the contained XMP before writing it back to the file.
    #include <cstdio>
    #include <vector>
    #include <string>
    #include <cstring>
    // Must be defined to instantiate template classes
    #define TXMP_STRING_TYPE std::string
    // Must be defined to give access to XMPFiles
    #define XMP_INCLUDE_XMPFILES 1
    // Ensure XMP templates are instantiated
    #include "public/include/XMP.incl_cpp"
    // Provide access to the API
    #include "public/include/XMP.hpp"
    #include <iostream>
    #include <fstream>
    using namespace std;
    * Creates an XMP object from an RDF string.  The string is used to
    * to simulate creating and XMP object from multiple input buffers.
    * The last call to ParseFromBuffer has no kXMP_ParseMoreBuffers options,
    * thereby indicating this is the last input buffer.
    #include <sstream>     
    SXMPMeta createXMPFromRDF()
        string rdf;
        //open the RDF file and put it's content into rdf buffer
        ifstream inFile;
        inFile.open("sample.xml");//open the input file
        if (!inFile.is_open()) {
            cout <<"Couldn't open xml file" <<endl;
            exit(1);
        stringstream strStream;
        strStream << inFile.rdbuf();//read the file
        rdf = strStream.str();//str holds the content of the file
        SXMPMeta meta;
        // Loop over the rdf string and create the XMP object
        // 10 characters at a time
        int i;
        for (i = 0; i < (long)rdf.size() - 10; i += 10 )
            meta.ParseFromBuffer ( &rdf[i], 10, kXMP_ParseMoreBuffers );
        meta.ParseFromBuffer ( &rdf[i], (XMP_StringLen) rdf.size() - i );
        return meta;
    int main ( int argc, const char * argv[] )
        if ( argc != 2 ) // 2 := command and 1 parameter
            cout << "usage: ModifyingXMP (filename)" << endl;
            return 0;
        string filename = string( argv[1] );
        if(!SXMPMeta::Initialize())
            cout << "Could not initialize toolkit!";
            return -1;
        XMP_OptionBits options = 0;
        #if UNIX_ENV
            options |= kXMPFiles_ServerMode;
        #endif
        // Must initialize SXMPFiles before we use it
        if(SXMPFiles::Initialize(options))
            try
                // Options to open the file with - open for editing and use a smart handler
                XMP_OptionBits opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUseSmartHandler;
                bool ok;
                SXMPFiles myFile;
                std::string status = "";
                // First we try and open the file
                ok = myFile.OpenFile(filename, kXMP_UnknownFile, opts);
                if( ! ok )
                    status += "No smart handler available for " + filename + "\n";
                    status += "Trying packet scanning.\n";
                    // Now try using packet scanning
                    opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUsePacketScanning;
                    ok = myFile.OpenFile(filename, kXMP_UnknownFile, opts);
                // If the file is open then read get the XMP data
                if(ok)
                    cout << status << endl;
                    cout << filename << " is opened successfully" << endl;
                    // Create the XMP object and get the XMP data
                    SXMPMeta meta;
                    myFile.GetXMP(&meta);
                    // Create a new XMP object from an RDF string
                    SXMPMeta rdfMeta = createXMPFromRDF();
                    // Append the newly created properties onto the original XMP object
                    // This will:
                    // a) Add ANY new TOP LEVEL properties in the source (rdfMeta) to the destination (meta)
                    // b) Replace any top level properties in the source with the matching properties from the destination
                    SXMPUtils::ApplyTemplate(&meta, rdfMeta, kXMPTemplate_AddNewProperties | kXMPTemplate_ReplaceExistingProperties | kXMPTemplate_IncludeInternalProperties);
                    // Check we can put the XMP packet back into the file
                    if(myFile.CanPutXMP(meta))
                        // If so then update the file with the modified XMP
                        myFile.PutXMP(meta);
                    // Close the SXMPFile.  This *must* be called.  The XMP is not
                    // actually written and the disk file is not closed until this call is made.
                    myFile.CloseFile();
                else
                    cout << "Unable to open " << filename << endl;
            catch(XMP_Error & e)
                cout << "ERROR: " << e.GetErrMsg() << endl;
            // Terminate the toolkit
            SXMPFiles::Terminate();
            SXMPMeta::Terminate();
        else
            cout << "Could not initialize SXMPFiles.";
            return -1;
        return 0;
    Please let me know if you find any issue/assistance.
    -Sunil

  • Unable to find the Metadata XML file.

    I am trying to apply the to Bundle Patch. In this process i am trying to upload the patch 13550561 into EM.
    Its shows a column to upload the "Metadata XML file".
    Please let me know which file need to upload in “Metadata XML file". I could not find any in the patch zip with that name.
    Thanks,
    support_dba

    Hi,
    This Metadata XML file needs to be downloaded during the patch download.
    When the "File download" pop up appears, at the bottom of the popup you will find a link "Download Patch Metadata".
    Click on that link, will download the Metadata XML file.
    Hope this clarifies your question.
    Best Regards,
    Venkat

  • Exporting metadata to an XML file

    Hi!
    I'm trying to write a script that exports the metadata (camera info and photo description) from all the images in a folder to an XML file and then saves it to the same folder.
    My knowledge of JavaScript is a little rusty and i would need some help. I started reading through the Bridge Scripting Guide, but i gave up...
    If someone could help me to get started with the script, i would really appreciate it.
    Thank you
    Balint

    This will get you started. It extracts properties from the EXIF and XMP Basic schemas from a selected thumbnail and writes the metadata to the JS console and to a file. Open the script in the ESTK and run it against Bridge with a selection made.
    The info you need to modify this script to suit your needs is in the JavaScript Tools guide which you can get with the Bridge SDK from http://www.adobe.com/devnet/bridge/
    // Load the XMP Script library
    if( xmpLib == undefined )
    if( Folder.fs == "Windows" )
    var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.dll";
    else
    var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.framework";
    var libfile = new File( pathToLib );
    var xmpLib = new ExternalObject("lib:" + pathToLib );
    // Get a selected thumbnail
    var thumb = app.document.selections[0];
    if(thumb.hasMetadata)
    // Get the selected file
    var selectedFile = thumb.spec;
    // Create an XMPFile - this allows you to extract the XMP data
    var myXmpFile = new XMPFile( selectedFile.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_READ);
    // The XMP object from the selected thumb
    var thumbXMP = myXmpFile.getXMP();
    // An empty XMP object
    var myXMP = new XMPMeta();
    // Create an iterator that will only visit EXIF properties
    var iter = thumbXMP.iterator(0, XMPConst.NS_EXIF);
    while((prop = iter.next()) != null)
    if(prop.path != "")
    //$.writeln(prop.namespace + " " + prop.path + " " + prop.value, prop.options);
    myXMP.setProperty(prop.namespace, prop.path, prop.value, prop.options);
    // Create an iterator that will only visit XMP Basic properties
    iter = thumbXMP.iterator(0, XMPConst.NS_XMP);
    while((prop = iter.next()) != null)
    if(prop.path != "")
    //$.writeln(prop.namespace + " " + prop.path + " " + prop.value, prop.options);
    myXMP.setProperty(prop.namespace, prop.path, prop.value, prop.options);
    var myXMPPacket = myXMP.serialize (XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER);
    $.writeln(updatedPacket);
    var outFile = File(thumb.spec.fsName + ".xml");
    outFile.open("w");
    outFile.write(myXMPPacket);
    outFile.close();

  • Updating Metadata with a sidecar.xml file...

    ... forces the app to be redownloaded again in ACV even if we have not made any modification in the articles.
    Why modifying the sidecar.xml file creates this unnecessary and time consuming process ?

    You use the web interface of xmlsidecar generator made by Johannes Henseler and the push the button there "generate". Copy paste that into a plain text file and then change tex extension from txt to xml. That's how you do a sidecar.xml the easy way.
    Afterwards, yo've got to import "multiple files" (or "many files"... my DPS is a Spanish one) from Folio Builder.
    If the folder are structured properly, folio builder will start swallowing the data of sidecar and uploading the articles.
    Right now, while posting this, my pc is doing that with about one hundred articles. As happy and busy as a beaver in heat
    Gustavo (Posting from Madrid)

  • Example XML file - tags, metadata, etc??

    Hi;
    Again, I apologize for being so obnoxious.
    When you specify the fileNameNoExt.xml by adding the -xml to your request, I am to assume that this overrides the config files at the packaging server, correct?
    So, on that note, I do not really see which XML tags I would need to add or edit.
    Where would I find a list of all of the accepted XML tags that I would use? The reason that I ask is that I do not see an XML tag that would indicate a Media Server location an/or URL.
    Maybe I just cannot see the forest through the trees.
    If someone has an example XML file that shows the location and src of the uploaded publication, would they PLEASE post it?
    That is all I would need. I just want to know what tags to put around these parameters. I am having a hell of a time finding that information.
    Thanks
    Glen

    Hi;
    Again, I apologize for being so obnoxious.
    When you specify the fileNameNoExt.xml by adding the -xml to your request, I am to assume that this overrides the config files at the packaging server, correct?
    So, on that note, I do not really see which XML tags I would need to add or edit.
    Where would I find a list of all of the accepted XML tags that I would use? The reason that I ask is that I do not see an XML tag that would indicate a Media Server location an/or URL.
    Maybe I just cannot see the forest through the trees.
    If someone has an example XML file that shows the location and src of the uploaded publication, would they PLEASE post it?
    That is all I would need. I just want to know what tags to put around these parameters. I am having a hell of a time finding that information.
    Thanks
    Glen

  • Population of XML file from bridge?

    I have a flash runtime for displaying pictures that reads the filename, thumbnail filename and a description of the picture and it reads the information from an .xml file. What I would like to do is type in a description of each picture using metadata in bridge, highlight the pictures I want (in the order I want them in) and have bridge perform the following tasks.
    1. Resize them to the size I specify.
    2. Create a small thumbnail of it (again at a specified size).
    3. Create and populate an .xml file with the information described above for each picture selected.
    I am quite sure 1 and 2 should be fairly easy, but don't know if #3 is even possible. Does anybody have any bright ideas?

    Thanks for the info. There are flash galleries that come with bridge, but how would you find out how they are generating XML? I would think that is code inside the program itself that is not available for viewing. Anyway, here is the xml that is needed. Here is the basic workflow I need.
    1. Add a brief description to each photo using one of the attribute fields in bridge.
    2. Select pictures in bridge in the order you want them to appear.
    3. Resize the pictures and optimize them for the web at a consistent size.
    4. Create a thumbnail graphic.
    5. Copy the images and thumbnails to a specified directory.
    6. Create an xml file as shown below.
    Again, thanks in advance for any help!
    <gallery>
    <setup path="../images/"/>
    <item>
    <thumb>t6.jpg</thumb>
    <img>6.jpg</img>
    <caption>Giraffe! </caption>
    </item>
    <item>
    <thumb>t12.jpg</thumb>
    <img>12.jpg</img>
    <caption>A pair of parrots</caption>
    </item>
    <item>
    <thumb>t11.jpg</thumb>
    <img>11.jpg</img>
    <caption>Playing pandas</caption>
    </item>
    </gallery>

  • To Get the value of a node in a XML file which is outside the envelope

    Hi Everyone,
    I am uploading data in a XML file into Oracle tables. I am using oracle 9i release 2. How to get a value of a node outside the envelope.
    Here is my xml file.
    <Response>
    <TaskNo>14</TaskNor>
    <ZoneResponse>
    <GetServiceStatusResponse xmlns="http://mws.zonemws.com/Shipment/2010-10-01/">
    <GetServiceStatusResult>
    <Status>GREEN</Status>
    <Date>2011-06-03</Date>
    </GetServiceStatusResult>
    <Metadata>
    <Id>c9488a06</Id>
    </Metadata>
    </GetServiceStatusResponse>
    </ZoneResponse>
    </Response>
    This is the response xml we are getting from the supplier. I do want to store all the values in an oracle table, including TaskNo(14). TaskNo is the main value
    here. I am using dbms_xmlparser and dbms_xmldom in PL/SQL. I am able to get the values inside the envelope, but not the outside(taskno). It is not showing any errors. It is processing all
    other values. I Posted this in the XML DB section also. Please help me to solve this issue. Any help,tips and suggesstion will be highly appreciated. Thanks in advance
    --Vimal                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    I am providing some additional info like procedure, table structure and sample xml file so that you can get a clear idea about my problem and help me.
    My Procedure
    PROCEDURE xml_upload (
    p_directory IN VARCHAR2,
    p_server_directory IN VARCHAR2,
    p_filename IN VARCHAR2
    AS
    l_bfile BFILE;
    l_clob CLOB;
    l_parser DBMS_XMLPARSER.parser;
    l_doc DBMS_XMLDOM.domdocument;
    l_noderowset DBMS_XMLDOM.domnode;
    l_noderow DBMS_XMLDOM.domnode;
    l_nodecount NUMBER;
    l_Resultlist DBMS_XMLDOM.domnodelist;
    l_request_id VARCHAR2 (300);
    l_task_number NUMBER;
    l_tasknum_list DBMS_XMLDOM.domnodelist;
    l_service_list DBMS_XMLDOM.domnodelist;
    l_time_list     DBMS_XMLDOM.domnodelist;
    l_tasknode DBMS_XMLDOM.domnode;
    l_servicenode DBMS_XMLDOM.domnode;
    l_temp VARCHAR2 (1000);
    l_table_name VARCHAR2 (100);
    l_cmd_execution VARCHAR2 (1000);
    l_orig_file_with_path VARCHAR2 (1000);
    l_dest_file_with_path VARCHAR2 (1000);
    l_status custom.task_status.status%TYPE;
    l_time custom.task_status.timestamps%TYPE;
    l_rows NUMBER;
    l_message SYS.XMLTYPE;
    l_return_status NUMBER;
    TYPE tab_type IS TABLE OF custom.task_status%ROWTYPE;
    t_tab tab_type := tab_type ();
    PROCEDURE write_exception (
    p1_filename VARCHAR2,
    p_comments VARCHAR2,
    p_rows_created NUMBER
    IS
    BEGIN
    read_xml_file (p_directory, p_filename, l_message, l_return_status);
    -- Convert the xml to a clob
    l_clob := l_message.getclobval();
    -- Create a parser.
    l_parser := DBMS_XMLPARSER.newparser;
    -- Parse the document and create a new DOM document.
    DBMS_XMLPARSER.parseclob (l_parser, l_clob);
    l_doc := DBMS_XMLPARSER.getdocument (l_parser);
    -- Free any resources associated with the CLOB and Parser
    -- dbms_lob.freetemporary(v_clob);
    DBMS_XMLPARSER.freeparser (l_parser);
    l_noderowset :=
    DBMS_XMLDOM.item
    (DBMS_XMLDOM.getchildnodes (DBMS_XMLDOM.makenode (l_doc)),
    0
    l_nodecount :=
    DBMS_XMLDOM.getlength (DBMS_XMLDOM.getchildnodes (l_noderowset))
    - 1;
    t_tab.EXTEND;
    FOR i IN 0 .. l_nodecount
    LOOP
    l_noderow :=
    DBMS_XMLDOM.item (DBMS_XMLDOM.getchildnodes (l_noderowset), i);
    l_Resultlist :=
    DBMS_XMLDOM.getelementsbytagname
    (DBMS_XMLDOM.makeelement (l_noderow),
    'RequestId'
    l_request_id :=
    DBMS_XMLDOM.getnodevalue
    (DBMS_XMLDOM.getfirstchild
    (DBMS_XMLDOM.item (l_Resultlist,
    0
    END LOOP;
    FOR i IN 0 .. l_nodecount
    LOOP
    l_noderow :=
    DBMS_XMLDOM.item (DBMS_XMLDOM.getchildnodes (l_noderowset), i);
    l_service_list:=
    DBMS_XMLDOM.getelementsbytagname
    (DBMS_XMLDOM.makeelement (l_noderow),
    'Status'
    l_status:=
    DBMS_XMLDOM.getnodevalue
    (DBMS_XMLDOM.getfirstchild
    (DBMS_XMLDOM.item (l_service_list,
    0
    l_time_list:=
    DBMS_XMLDOM.getelementsbytagname
    (DBMS_XMLDOM.makeelement (l_noderow),
    'Timestamp'
    l_time:=
    DBMS_XMLDOM.getnodevalue
    (DBMS_XMLDOM.getlastchild
    (DBMS_XMLDOM.item (l_time_list,
    0
    END LOOP;
    select
    extractvalue(column_value,'/Response/TaskNumber') into l_task_number
    from
    table(xmlsequence(xmltype('<Response>
    <TaskNumber>14</TaskNumber>
    <ZoneResponse>
    <GetServiceStatusResponse xmlns="http://mws.zoneaws.com/InboundShipment/2010-10-01/">
    <GetServiceStatusResult>
    <Status>GREEN</Status>
    <Timestamp>2011-06-03T22:17:17.313Z</Timestamp>
    </GetServiceStatusResult>
    <Metadata>
    <RequestId>c9488a06-73c6-474e-b356-51d5f8feec00</RequestId>
    </Metadata>
    </GetServiceStatusResponse>
    </ZoneResponse>
    </Response>
    t_tab (t_tab.LAST).status:= l_status;
    t_tab (t_tab.LAST).timestamps:= l_time;
    t_tab (t_tab.LAST).amz_request_id:= l_request_id;
    t_tab (t_tab.LAST).tasknumber:= l_task_number;
    -- Insert data into the real Staging table from the table collection.
    FORALL i IN t_tab.first .. t_tab.last
    INSERT INTO custom.task_status VALUES t_tab(i);
    COMMIT;
    DBMS_XMLDOM.freedocument (l_doc);
    DBMS_LOB.freetemporary (l_clob);
    DBMS_XMLPARSER.freeparser (l_parser);
    DBMS_XMLDOM.freedocument (l_doc);
    DBMS_LOB.freetemporary (l_clob);
    DBMS_XMLPARSER.freeparser (l_parser);
    DBMS_XMLDOM.freedocument (l_doc);
    END rrs_xml_upload;
    Sample File:
    <Response>
    <TaskNumber>14</TaskNumber>
    <ZoneResponse>
    <GetServiceStatusResponse xmlns="http://mws.zoneaws.com/InboundShipment/2010-10-01/">
    <GetServiceStatusResult>
    <Status>GREEN</Status>
    <Timestamp>2011-06-03T22:17:17.313Z</Timestamp>
    </GetServiceStatusResult>
    <Metadata>
    <RequestId>c9488a06-73c6-474e-b356-51d5f8feec00</RequestId>
    </Metadata>
    </GetServiceStatusResponse>
    </ZoneResponse>
    </Response>
    Table: task_status
    tasknumber number,
    status varchar2(100),
    timestamps varchar2(100),
    requestid varchar2(100)
    all I want is to populate the data from xml file to the particulare table. I can do that with the above procedure.
    But In this below mentioned part of my procedure , I want to pass the file name instead of giving the entire content.
    select
    extractvalue(column_value,'/Response/TaskNumber') into l_task_number
    from
    table(xmlsequence(xmltype('<Response>
    <TaskNumber>14</TaskNumber>
    <ZoneResponse>
    <GetServiceStatusResponse xmlns="http://mws.zoneaws.com/InboundShipment/2010-10-01/">
    <GetServiceStatusResult>
    <Status>GREEN</Status>
    <Timestamp>2011-06-03T22:17:17.313Z</Timestamp>
    </GetServiceStatusResult>
    <Metadata>
    <RequestId>c9488a06-73c6-474e-b356-51d5f8feec00</RequestId>
    </Metadata>
    </GetServiceStatusResponse>
    </ZoneResponse>
    </Response>
    Alex or any other oracle pl/sql experts please help me to solve this issue.
    FYI : I am using Oracle 9.2.0.8.0
    Thanks,
    Vimal..
    Edited by: Vimal on Jun 13, 2011 4:10 PM

  • URGENT: Importing deployed-composites.xml File into MDS

    Gurus,
    I am running into a problem whereby soa-infra application crashes upon server restart.
    This doesn't allow soa_server (managed server) to come up properly.
    I see the following error during server start up:
    <Sep 20, 2011 3:02:18 AM PDT> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'soa-infra'.
    weblogic.application.ModuleException: [HTTP:101216]Servlet: "FabricInit" failed to preload on startup in Web application: "/soa-infra".
    oracle.fabric.common.FabricException: Error in getting XML input stream: oramds:/deployed-composites/default/AttachmentSR_Sample_Composite_rev1.0/SCA-INF/lib/rt.jar: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/deployed-composites/default/AttachmentSR_Sample_Composite_rev1.0/SCA-INF/lib/rt.jar does not exist.
    at oracle.fabric.common.metadata.MetadataManagerImpl.getInputStreamFromAbsoluteURL(MetadataManagerImpl.java:276)
    at oracle.integration.platform.common.MDSMetadataManagerImpl.getInputStreamFromAbsoluteURL(MDSMetadataManagerImpl.java:545)
    at oracle.integration.platform.common.MDSMetadataManagerImpl.transferFile(MDSMetadataManagerImpl.java:820)
    at oracle.integration.platform.common.MDSMetadataManagerImpl.copyTree(MDSMetadataManagerImpl.java:801)
    at oracle.fabric.composite.model.CompositeModel.getClassLoaderFiles(CompositeModel.java:347)
    at oracle.fabric.composite.model.CompositeModel.getCompositeClassloader(CompositeModel.java:203)
    at oracle.integration.platform.kernel.WLSFabricKernelInitializer.deployComposite(WLSFabricKernelInitializer.java:506)
    What I am doing is this: I have added a SCA-INF/lib folder inside the project and added rt.jar file in it. Then I tried to deploy it, deployment did not happen successfully however, it made an entry in MDS as I could see entire composite in MDS along with rt.jar file. Now, when server restarts, it always tries to load the jar file from MDS and for some reason, it doesn't find the jar file despite it being very much in MDS at the correct path.
    Because of this, I ran into a deadlock situation.
    I cannot remove the composite from MDS (using removeSharedData ant task or WLST offline command) as my soa managed server is not up. So, request to http://serverhost:8001 throws 404 error when I use removeSharedData Ant task and WLST offliine sca_undeployCompoiste command. And, this composite entry in MDS doesn't allow the server to start up properly!!
    As another workaround, I've modified deployed-composites.xml file. But without soa-infra listed in EM Console, I cannot import the file.
    Does anyone know how I can import/upload deployed-composites.xml file from outside EM console (and without soa-infra being up!)?
    Thanks-
    Ashish

    If its urgent maybe you can delete the record from all the deployed composites from the Metadata database (you will have to redeploy all of them and you will leave some tush in the content tables).
    connect to the metadata database (XXXXX_MDS schema) configured for that soa_server, you will find a table named MDS_PATHS.
    there you will see all the paths of the files stored in the MDS.
    backup the table and then try
    1) THIS COMMAND DELETE ALL COMPOSITES PAHTS FROM METADATA but it leaves some blob content orphan:
    Execute:
    delete from mds_paths where path_fullname like '/deployed-composites%' and path_fullname <> '/deployed-composites' and path_fullname <> '/deployed-composites/default'; --if you have another partition you can filterit there
    restart the soa_server and the soa-infra will start with no composites. You will have to redeploy them all (but it will come up :).
    I use this method when the soa-infra wont come up because it doesnt found some file on /deployed-composites/.....................
    Anyway, if something goes wrong you can restore the table from your backup ;)
    글 수정: user7691407

  • Error while Importing ResourceObject  xml file in Deployment Manager

    Hi Everyone,
    I am getting this error while doing Import of HRPeopleSoftResourceObjects.xml ( A Resource Object xml file) in Deployment Manager. I am doing this step for Authoritative(Trusted Source) Reconciliation.
    Error Says:- Attribute not present in EntityDefination of User :: ExpectedReturnDate.
    ExpectedReturnDate is a UDF (Customize) field. I did Metadata and Sandbox import for this field to create this attribute in OIM. I can see this attribute on User Details screen as well as in User Table in OIM. So, ideally this error should not popup. I have to do this import for Reconciliation.
    I pulled and checked all the xml files like(UserEO.xml.xml, userEO.xml.xml, userVO.xml, UserVO.xml.xml) from oracle.iam.console.identity.self-service.ear_V2.0_metadata1 and found ExpectedReturnDate field is available.
    I am using: OIM Version - Oracle 11g Release 2
    Database version - 11.2.0
    Weblogic version - 10.3
    Please let me know how to resolve this error.
    Appreciate your response and support!
    Warm Regards
    Vijay Kumar

    Appreciate your response Kevin!
    I saw your response today. What you have suggested in your post make perfect sense to me.
    Yesterday, I was able to create Reconciliation profile successfully. No idea how it worked so, didn't updated my post.
    I tried to re-import the UDF, noticed ExpectedReturnDate attribute has little icon in fornt of it on deployment manager screen which says on mouse over "new field". No idea why as I didn't delete it from anywhere, perhaps it didn't get imported properly previously. I stepped ahead and clicked the import button on deployment manager but failed as it was throwing an exception which says udf_usr_expectedReturnDate is available in usr table. That makes sense to me as this column got created in usr table in OIM because of previous import and I didn't delete it either. This raised couple of doubts more as, along with this attribute there were other attributes in the same metadata xml file which were part of previous import and their respective columns were already created in usr table. Then why message poped-up for this field in particular? Anyway I went ahead with the import process.
    Now I stopped all the server (Admin, SOA and OIM) and restarted them again and performed the same steps as mentioned above and this time it worked as expected. UDF file got imported successfully.
    After this I went to Design Console verified all the fields and created the Reconciliation Profile. I checked OIM database and found RA_ProfileName recon tables got created.
    As per your comment, Today I checked the RECON_USER_OLDSTATE table but this table is empty.
    Still I have couple of doubts, if Reconciliation Profile got created it should create the xml file under metadata direcectory(in my case path should be: /apps/Oracle/Middleware/Oracle_IDM1/server/metadata/db). Please correct me if I am wrong? I hope it should be physical file not a logical file.
    Once again thanks for your response!
    Warm Regards
    Vijay Kumar

  • Error  while import XML file from Production to Dev., But has GREEN status

    Hi,
    I tried to export/import bex queries through XML transportation. Transportation is being done from Production system to Development. In transport connection I selected required query and then I exported to Development. export of file is done successfully.
    Now in development system I imported that XML file. It is imported. Giving GREEN symbol and also with GREEN check. But in Log view I found ERRORS. in errors it is mentioned "SAP object 46N3K1OCT22PSBN46O95MQLTJ () cannot be imported". along with long message text "Install the specified objects from Business Content. Only import the metadata afterwards.".
    What should I do now as of next step... import of file is stuck..
    How can I search object 46N3K1OCT22PSBN46O95MQLTJ (), if I have to install from BC.
    I am also unable to find the query in Development Bex analyser.
    Thanks for help....
    [email protected]

    Hi Babloo,
    According to the error message, the package may have failed are as follows:
    The user account that is used to run the package under SQL Server Agent in PRODUCTION server differs from the original package author.
    The user account does not have the required permissions to make connections or to access resources outside the SSIS package.
    The package may not run in the following scenarios:
    The current user cannot decrypt secrets from the package. This scenario can occur if the current account or the execution account differs from the original package author, and the package's ProtectionLevel property setting does not let the current user
    decrypt secrets in the package. In this scenario, we can change the SSIS Package ProtectionLevel property to EncryptSensitiveWithPassword, then modify the SQL Server Agent job step command line to include this password.
    File access fails because the current user does not have the required permissions to write to the file share that the connection manager accesses. In this scenario, we can create a SQL Server Agent proxy account. This proxy account must use a credential
    that lets SQL Server Agent run the job as the account that created the package or as an account that has the required permissions.
    References:
    SSIS package does not run when called from a SQL Server Agent job step
    Run an SSIS Package Under a Different Account
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Missing XML files in Export of Portal Resource in WebCenter Portal App

    Using JDeveloper 11.1.1.5.0
    1) Create a JSF fragment in the Portal Project/WebContent/oracle/webcenter/portalapp/pages -> untiltled3.jsff.
    2) From the Component Palette -> Webcenter Content Display Templates, drag a Content Template Def onto the jsff.
    3) Create var = "node".
    4) Drag an AdfOutputText into the contentTemplateDef.
    5) Save.
    6) In Application Navigator, right click on untitled3.jsff -> View Page Definition. No page definition has been created. Create a new page definition.
    7) In Application Navigator, right click on untitled3.jsff -> Create Portal Resource.
    7.1) Select my Content Repository Name(already created a content server Application Resource called UML)
    7.2) Content Type - IDC:GlobalProfile
    7.3) Content Type Default View: true
    7.4) View ID - testTemplate
    7.5) Display Name - untitled3
    7.6) Content Directory - defaulted to /C:/Projects/Application1/Portal/public_html/oracle/webcenter/portalapp/shared/
    8) Click OK.
    9) In Application Navigator, right click on untitled3.jsff -> Export Portal Resource.
    1) Export Archive File Name -> M:\testTemplate6102011
    10) Click OK.
    11) Results in the following:
    This is displayed in the Messages - Log:
    Jun 10, 2011 10:47:12 AM oracle.mds
    WARNING: The associated extended metadata document for the given document name /oracle/webcenter/portalapp/pages/untitled3PageDef.xml is missing.
    Jun 10, 2011 10:47:12 AM oracle.mds
    WARNING: The associated extended metadata document for the given document name /oracle/webcenter/portalapp/pages/untitled3.jsff is missing.
    Jun 10, 2011 10:47:12 AM oracle.mds
    WARNING: The associated extended metadata document for the given document name /oracle/webcenter/portalapp/pages/untitled3PageDef.xml is missing.
    How do I setup JDev to include the missing xml files? What am I doing wrong?
    Follow Up:
    When I Upload my testTemplate6102011.ear in Webcenter Spaces-> Resources -> Content Presenter I get the following error in the Spaces log file:
    Message ID     WCS-12045
    Message Level     1
    Relationship ID     0
    Component     WCSpaces
    Module     oracle.webcenter.lifecycle.siteresource.operation.SiteResourceImportOperation
    Thread ID     [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'
    ECID     5b329033a707e8d5:2d924c4d:130755eef60:-8000-00000000000061c3
    Message     Operation aborted because of an exception thrown by subunit (oracle.webcenter.lifecycle.siteresource.configuration.SiteResourceConfigurationUnit)
    Supplemental Detail     oracle.webcenter.lifecycle.LifecycleException: Unexpected error occurred while adding a generic site resource.
    at oracle.webcenter.portalframework.genericsiteresources.model.lifecycle.SiteResourcesHelper.addSiteResource(SiteResourcesHelper.java:222)
    at oracle.webcenter.portalframework.genericsiteresources.model.lifecycle.DefaultSiteResourceLifecycleHandler.updateImportRegistry(DefaultSiteResourceLifecycleHandler.java:824)
    at oracle.webcenter.lifecycle.siteresource.SiteResourceLifecycleHandler.doConfigurationImport(SiteResourceLifecycleHandler.java:273)
    at oracle.webcenter.lifecycle.siteresource.configuration.SiteResourceConfigurationUnit.doImport(SiteResourceConfigurationUnit.java:121)
    at oracle.webcenter.lifecycle.siteresource.operation.SiteResourceImportOperation.doImport(SiteResourceImportOperation.java:129)
    at oracle.webcenter.lifecycle.LifecycleSiteResourceService.doImport(LifecycleSiteResourceService.java:339)
    at oracle.webcenter.lifecycle.view.siteresource.LifecycleSRMImportBean.doImport(LifecycleSRMImportBean.java:198)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.el.parser.AstValue.invoke(Unknown Source)
    at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
    at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:312)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.bi.nanserver.adf.servlet.BIADFServletFilter.doFilter(BIADFServletFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.bi.presentation.runtime.binding.BIRegionBindingFilter.doFilter(BIRegionBindingFilter.java:43)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.portlet.client.adapter.adf.ADFPortletFilter.doFilter(ADFPortletFilter.java:32)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.webcenter.framework.events.dispatcher.EventDispatcherFilter.doFilter(EventDispatcherFilter.java:44)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.wcps.client.PersonalizationFilter.doFilter(PersonalizationFilter.java:75)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.webcenter.content.integration.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:168)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.webcenter.generalsettings.model.provider.GeneralSettingsProviderFilter.doFilter(GeneralSettingsProviderFilter.java:83)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.webcenter.webcenterapp.internal.view.webapp.WebCenterShellPageRedirectionFilter.doFilter(WebCenterShellPageRedirectionFilter.java:250)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.webcenter.webcenterapp.internal.view.webapp.WebCenterShellFilter.doFilter(WebCenterShellFilter.java:696)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.view.page.editor.webapp.WebCenterComposerFilter.doFilter(WebCenterComposerFilter.java:109)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:62)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.webcenter.webcenterapp.internal.view.webapp.WebCenterLocaleWrapperFilter.processFilters(WebCenterLocaleWrapperFilter.java:335)
    at oracle.webcenter.webcenterapp.internal.view.webapp.WebCenterLocaleWrapperFilter.doFilter(WebCenterLocaleWrapperFilter.java:224)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: oracle.webcenter.portalframework.genericsiteresources.GenericSiteResourcesException: Unexpected error occurred while adding a generic site resource.
    at oracle.webcenter.portalframework.genericsiteresources.internal.model.GenericSiteResourcesManagerImpl.addResource(GenericSiteResourcesManagerImpl.java:333)
    at oracle.webcenter.portalframework.genericsiteresources.model.lifecycle.SiteResourcesHelper.addSiteResource(SiteResourcesHelper.java:214)
    at oracle.webcenter.portalframework.genericsiteresources.model.lifecycle.DefaultSiteResourceLifecycleHandler.updateImportRegistry(DefaultSiteResourceLifecycleHandler.java:824)
    at oracle.webcenter.lifecycle.siteresource.SiteResourceLifecycleHandler.doConfigurationImport(SiteResourceLifecycleHandler.java:273)
    at oracle.webcenter.lifecycle.siteresource.configuration.SiteResourceConfigurationUnit.doImport(SiteResourceConfigurationUnit.java:121)
    at oracle.webcenter.lifecycle.siteresource.operation.SiteResourceImportOperation.doImport(SiteResourceImportOperation.java:130)
    at oracle.webcenter.lifecycle.LifecycleSiteResourceService.doImport(LifecycleSiteResourceService.java:339)
    at oracle.webcenter.lifecycle.view.siteresource.LifecycleSRMImportBean.doImport(LifecycleSRMImportBean.java:202)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.el.parser.AstValue.invoke(Unknown Source)
    at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
    at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:93)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:93)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:93)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:93)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:312)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.bi.nanserver.adf.servlet.BIADFServletFilter.doFilter(BIADFServletFilter.java:28)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.bi.presentation.runtime.binding.BIRegionBindingFilter.doFilter(BIRegionBindingFilter.java:44)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.portlet.client.adapter.adf.ADFPortletFilter.doFilter(ADFPortletFilter.java:34)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.webcenter.framework.events.dispatcher.EventDispatcherFilter.doFilter(EventDispatcherFilter.java:45)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.wcps.client.PersonalizationFilter.doFilter(PersonalizationFilter.java:75)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.webcenter.content.integration.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:168)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.webcenter.generalsettings.model.provider.GeneralSettingsProviderFilter.doFilter(GeneralSettingsProviderFilter.java:83)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.webcenter.webcenterapp.internal.view.webapp.WebCenterShellPageRedirectionFilter.doFilter(WebCenterShellPageRedirectionFilter.java:253)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.webcenter.webcenterapp.internal.view.webapp.WebCenterShellFilter.doFilter(WebCenterShellFilter.java:701)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.adf.view.page.editor.webapp.WebCenterComposerFilter.doFilter(WebCenterComposerFilter.java:116)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:62)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:447)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:447)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:176)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.webcenter.webcenterapp.internal.view.webapp.WebCenterLocaleWrapperFilter.processFilters(WebCenterLocaleWrapperFilter.java:335)
    at oracle.webcenter.webcenterapp.internal.view.webapp.WebCenterLocaleWrapperFilter.doFilter(WebCenterLocaleWrapperFilter.java:224)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    ... 6 more
    Caused by: oracle.security.idm.OperationFailureException: javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: DomainDnsZones.fitchdevna.corp:389 [Root exception is java.net.UnknownHostException: DomainDnsZones.fitchdevna.corp]]
    at oracle.security.idm.providers.stdldap.util.LDAPRealm.throwException(LDAPRealm.java:773)
    at oracle.security.idm.providers.stdldap.util.DirectSearchResponse.initSearch(DirectSearchResponse.java:162)
    at oracle.security.idm.providers.stdldap.util.NonPagedSearchResponse.<init>(NonPagedSearchResponse.java:52)
    at oracle.security.idm.providers.stdldap.util.NonPagedSearchResponse.<init>(NonPagedSearchResponse.java:44)
    at oracle.security.idm.providers.stdldap.util.LDAPRealm.searchUsers(LDAPRealm.java:489)
    at oracle.security.idm.providers.stdldap.LDIdentityStore.search(LDIdentityStore.java:273)
    at oracle.security.idm.providers.stdldap.LDIdentityStore.searchUsers(LDIdentityStore.java:366)
    at oracle.webcenter.framework.service.Utility.findUserByGuid(Utility.java:765)
    at oracle.webcenter.portalframework.genericsiteresources.internal.model.GenericSiteResourcesManagerImpl.addResource(GenericSiteResourcesManagerImpl.java:179)
    ... 104 more
    Caused by: javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: DomainDnsZones.fitchdevna.corp:389 [Root exception is java.net.UnknownHostException: DomainDnsZones.fitchdevna.corp]]
    at com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(LdapNamingEnumeration.java:224)
    at com.sun.jndi.ldap.LdapNamingEnumeration.hasMore(LdapNamingEnumeration.java:171)
    at oracle.security.idm.providers.stdldap.util.DirectSearchResponse.initSearch(DirectSearchResponse.java:137)
    at oracle.security.idm.providers.stdldap.util.NonPagedSearchResponse.<init>(NonPagedSearchResponse.java:52)
    at oracle.security.idm.providers.stdldap.util.NonPagedSearchResponse.<init>(NonPagedSearchResponse.java:43)
    at oracle.security.idm.providers.stdldap.util.LDAPRealm.searchUsers(LDAPRealm.java:489)
    at oracle.security.idm.providers.stdldap.LDIdentityStore.search(LDIdentityStore.java:273)
    at oracle.security.idm.providers.stdldap.LDIdentityStore.searchUsers(LDIdentityStore.java:366)
    at oracle.webcenter.framework.service.Utility.findUserByGuid(Utility.java:765)
    at oracle.webcenter.portalframework.genericsiteresources.internal.model.GenericSiteResourcesManagerImpl.addResource(GenericSiteResourcesManagerImpl.java:179)
    at oracle.webcenter.portalframework.genericsiteresources.model.lifecycle.SiteResourcesHelper.addSiteResource(SiteResourcesHelper.java:214)
    at oracle.webcenter.portalframework.genericsiteresources.model.lifecycle.DefaultSiteResourceLifecycleHandler.updateImportRegistry(DefaultSiteResourceLifecycleHandler.java:824)
    at oracle.webcenter.lifecycle.siteresource.SiteResourceLifecycleHandler.doConfigurationImport(SiteResourceLifecycleHandler.java:273)
    at oracle.webcenter.lifecycle.siteresource.configuration.SiteResourceConfigurationUnit.doImport(SiteResourceConfigurationUnit.java:121)
    at oracle.webcenter.lifecycle.siteresource.operation.SiteResourceImportOperation.doImport(SiteResourceImportOperation.java:129)
    at oracle.webcenter.lifecycle.LifecycleSiteResourceService.doImport(LifecycleSiteResourceService.java:339)
    at oracle.webcenter.lifecycle.view.siteresource.LifecycleSRMImportBean.doImport(LifecycleSRMImportBean.java:198)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.el.parser.AstValue.invoke(Unknown Source)
    at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
    at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:312)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.bi.nanserver.adf.servlet.BIADFServletFilter.doFilter(BIADFServletFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.bi.presentation.runtime.binding.BIRegionBindingFilter.doFilter(BIRegionBindingFilter.java:43)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.portlet.client.adapter.adf.ADFPortletFilter.doFilter(ADFPortletFilter.java:32)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.webcenter.framework.events.dispatcher.EventDispatcherFilter.doFilter(EventDispatcherFilter.java:44)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterCh

    Hi,
    try this forum: WebCenter Portal
    Frank

  • How to create new XML file using retreived XML content by using SAX API?

    hi all,
    * How to create new XML file using retreived XML content by using SAX ?
    * I have tried my level best, but output is coming invalid format, my code is follows,
    XMLFileParser.java class :-
    import java.io.StringReader;
    import java.io.StringWriter;
    import javax.xml.transform.OutputKeys;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMResult;
    import javax.xml.transform.sax.SAXSource;
    import javax.xml.transform.sax.SAXTransformerFactory;
    import javax.xml.transform.sax.TransformerHandler;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.XMLFilterImpl;
    public class PdfParser extends XMLFilterImpl {
        private TransformerHandler handler;
        Document meta_data;
        private StringWriter meta_data_text = new StringWriter();
        public void startDocument() throws SAXException {
        void startValidation() throws SAXException {
            StreamResult streamResult = new StreamResult(meta_data_text);
            SAXTransformerFactory factory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
            try
                handler = factory.newTransformerHandler();
                Transformer transformer = handler.getTransformer();
                transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                handler.setResult(streamResult);
                handler.startDocument();
            catch (TransformerConfigurationException tce)
                System.out.println("Error during the parse :"+ tce.getMessageAndLocation());
            super.startDocument();
        public void startElement(String namespaceURI, String localName,
                String qualifiedName, Attributes atts) throws SAXException {
            handler.startElement(namespaceURI, localName, qualifiedName, atts);
            super.startElement(namespaceURI, localName, qualifiedName, atts);
        public void characters(char[] text, int start, int length)
                throws SAXException {
            handler.characters(text, start, length);
            super.characters(text, start, length);
        public void endElement(String namespaceURI, String localName,
                String qualifiedName) throws SAXException {
            super.endElement("", localName, qualifiedName);
            handler.endElement("", localName, qualifiedName);
        public void endDocument() throws SAXException {
        void endValidation() throws SAXException {
            handler.endDocument();
            try {
                TransformerFactory transfactory = TransformerFactory.newInstance();
                Transformer trans = transfactory.newTransformer();
                SAXSource sax_source = new SAXSource(new InputSource(new StringReader(meta_data_text.toString())));
                DOMResult dom_result = new DOMResult();
                trans.transform(sax_source, dom_result);
                meta_data = (Document) dom_result.getNode();
                System.out.println(meta_data_text);
            catch (TransformerConfigurationException tce) {
                System.out.println("Error occurs during the parse :"+ tce.getMessageAndLocation());
            catch (TransformerException te) {
                System.out.println("Error in result transformation :"+ te.getMessageAndLocation());
    } CreateXMLFile.java class :-
    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();
    Sax.endElement("", "basic-metadata", "basic-metadata");* In CreateXMLFile.java
    class, I have retreived the xml content in the meta_data object, after that i have converted into character array and this will be sends to SAX
    * In this case , the XML file created successfully but the retreived XML content added as an text in between basic-metadata Element, that is, retreived XML content
    is not an XML type text, it just an Normal text Why that ?
    * Please help me what is the problem in my code?
    Cheers,
    JavaImran

    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    </code><code>Sax.endElement("", "basic-metadata", "basic-metadata");</code>
    <code class="jive-code jive-java">Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();     
    * I HAVE CHANGED MY AS PER YOUR SUGGESTION, NOW SAME RESULT HAS COMING.
    * I AM NOT ABLE TO GET THE EXACT OUTPUT.,WHY THAT ?
    Thanks,
    JavaImran{code}

Maybe you are looking for

  • Word wrap with JScrollPane

    Quick question. Trying to get word wrap in a JTextField using JSrollPane. Below is a small snippet of code from my program... displayArea = new JTextArea ( ); JScrollPane scroll = new JScrollPane ( displayArea,    JScrollPane.VERTICAL_SCROLLBAR_ALWAY

  • Manual Bank Reconciliation Statement - Processing Batch Input Session

    Hi experts, After processing FF67 transaction, while processing batch input session, system expecting manual clearing of open items in bank sub accounts.  If I manually clear, then only it is processing further till end of all transactions in batch i

  • Meraki Systems Manager vs Apple Configurator?

    I see people waving around Meraki Systems Manager as an alternative to Apple Configurator for mobile device management, but it is unclear what specific advantages Meraki offers vs Apple Configurator. There seem to be some very serious limitations, pa

  • Safari Download Folder

    I accidentally removed the Safari download window from my Doc. Does anybody know how to put it back?

  • Error will creating function

    Hi Team, I am getting error message while creating Function script as below.. CREATE TYPE Book_t AS OBJECT ( name VARCHAR2(100),   AUTHOR VARCHAR2(30),   ABSTRACT VARCHAR2(1000)); CREATE TYPE BOOKSET_T AS TABLE OF BOOK_T; CREATE TABLE Catalogs ( NAME