Help plzz abt xml

public static int replaceTag(String targetTagName, String newTagName, String xmlDoc)
public static int replaceTag(String targetTagName, String newTagName,Document xmlDoc)
The above two methods replace the element name of every targetTagName element with a string newTagName in an XML string or a document respectively.
in the above problem i have doubt regarding the replacement of wht exactly and also regarding the string xmldoc ???????
can any one help me out with a example
thanks
bye
sri.

The targetTagName is replaced with newTagName.
String xmlDoc represents the file url of the xml document, for example, "file://c:/input/input.xml".
Document xmlDoc is the org.w3c.dom.Document object.

Similar Messages

  • How to pop up "save" and "open" window - Help with construct xml

    In my report there is a column link which is pointing to another HTML page that has xml data displayed in a textarea field. So when user clicks on the column link, he gets to directed to the page that have the xml data in text format.
    My question is, how can i make the xml data display as a file, so when the user clicks on the column link, a window with "save" and "open" will pop up so the user can save the xml data as a file?
    Has anyone done something similar like this? any help is appreciated!
    Regards,
    gina
    Message was edited by:
    gina

    Thank you Tine, I tried to use the 'Export XML' report template and tried to do the following query:
    SELECT XMLElement("oai_dc:dc",
    XMLAttributes('http://www.openarchives.org/OAI/2.0/oai_dc/' AS "xmlns:oai_dc",
                        'http://purl.org/dc/elements/1.1/' AS "xmlns:dc",
    'http://www.w3.org/2001/XMLSchema-instance' AS "xmlns:xsi",
    'http://www.loc.gov/mods/v3' AS "xmlns:mods"
    XMLForest(
    dctitle AS "dc:title",
    dccreator AS "dc:creator",
    dcsubject AS "dc:subject",
    dcdescription AS "dc:description",
    dccontributor AS "dc:contributor",
    dcdiscovery AS "dc:discovery",
    dctype AS "dc:type",
    dcformat AS "dc:format",
    LOWER('ksl:posters-' || dcidentifier) AS "dc:identifier",
    dcsource AS "dc:source",
    dclanguage AS "dc:language",
    dcrelation AS "dc:relation",
    dccoverage AS "dc:coverage",
    dcrights AS "dc:rights")) AS "RESULT"
    FROM table_name
    and here is what returned in the “save as" file:
    <?xml version="1.0" encoding="utf-8" ?>
    - <XMLREPORTREGION>
    - <ROW ROWNUM="1">
    <RESULT>[datatype]</RESULT>
    </ROW>
    </XMLREPORTREGION>
    How can i construct the query so that it returns the data in xml format like the following?:
    oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
    <dc:title>Rose</dc:title>
    <dc:creator>Smith Black</dc:creator>
    <dc:contributor>Smith Black</dc:contributor>
    <dc:type>Stencil</dc:type>
    <dc:format>image/tiff</dc:format>
    <dc:format>image/jp2</dc:format>
    <dc:description>13 3/4" X 9 1/2"</dc:description>
    <dc:relation>Some collection</dc:relation>
    <dc:date>1987</dc:date>
    <dc:subject type="LCSH">Art Project</dc:subject>
    <dc:subject type="LCSH">........</dc:subject>
    <dc:subject type="LCSH">.........</dc:subject>
    <dc:language>eng</dc:language>
    <dc:rights>......<dc:rights>
    <dc:identifier>.....</dc:identifier>
    </oai_dc:dc>
    I don't know much about xml, any help would be really appreciated.
    Thanks,
    gina
    Message was edited by:
    gina

  • Help needed in XML Bursting

    Hi,
    I am working first time on XML report bursting concept.
    I have two remit to addresses in my report xml. I nedd to burst my report at address level.
    This is my report xml:
    <ARXSGPO>
    <LIST_G_SETUP>
    <G_SETUP>
    <LIST_G_STATEMENT>
    <G_STATEMENT>
    <LIST_G_AMOUNT_DUE>
    <G_AMOUNT_DUE>
    <LIST_G_LINE_CLUSTER>
    <G_LINE_CLUSTER>
    </G_AMOUNT_DUE>
    </LIST_G_AMOUNT_DUE>
    <LIST_G_1>
    <G_1>
    <CF_REMIT_TO_ADDRESS1>Phoenix Centre </CF_REMIT_TO_ADDRESS1>
    <CF_REMIT_TO_ADDRESS2>Millenium Way West</CF_REMIT_TO_ADDRESS2>
    <CF_REMIT_TO_ADDRESS3 />
    <CF_REMIT_TO_ADDRESS4 />
    <CF_REMIT_TO_ADDRESS5 />
    </G_STATEMENT>
    <G_STATEMENT>
    <LIST_G_AMOUNT_DUE>
    <G_AMOUNT_DUE>
    <LIST_G_LINE_CLUSTER>
    <G_LINE_CLUSTER>
    </G_LINE_CLUSTER>
    </LIST_G_LINE_CLUSTER>
    </G_AMOUNT_DUE>
    <LIST_G_1>
    <G_1>
    <CF_REMIT_TO_ADDRESS1>Second Avenue</CF_REMIT_TO_ADDRESS1>
    <CF_REMIT_TO_ADDRESS2>Poynton Industrial Estate </CF_REMIT_TO_ADDRESS2>
    <CF_REMIT_TO_ADDRESS3 />
    <CF_REMIT_TO_ADDRESS4 />
    <CF_REMIT_TO_ADDRESS5 />
    </G_SETUP>
    </LIST_G_SETUP>
    </ARXSGPO>
    I am defining my control file like this.
    <?xml version="1.0" encoding="UTF-8" ?>
    <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi" type="bursting">
    <xapi:request select="ARXSGPO/LIST_G_SETUP/G_SETUP/LIST_G_STATEMENT/G_STATEMENT/LIST_G_AMOUNT_DUE/G_AMOUNT_DUE/
    LIST_G_LINE_CLUSTERG_LINE_CLUSTER/LIST_G_1/G_1/CF_REMIT_TO_ADDRESS1">
    <xapi:delivery>
    <xapi:print id="printer1" printer="ipp://ipgpc1.us.oracle.com:631/printers/printer_p6op286a" copies="1" />
    </xapi:delivery>
    <xapi:document output-type="pdf" delivery="printer1">
    <xapi:template type="rtf" location="location="/disk3/oracle/viscomn/java/oracle/apps/fnd/cp/sample/statement.rtf" filter=".//G_1[INTERNAL_NOTES='PRINTER']" />
    </xapi:document>
    </xapi:request>
    </xapi:requestset>
    1) Can I use CF_REMIT_TO_ADDRESS1 in the attribute select under the request element
    2) In Database I have two printers attached for these addresses. I need to send output directly to printer. How can I differentiate details of
    printer in control file for each address?
    Please help me in this.
    Thanks in advance

    Hi,
    Thanks for your reply. when I am running my request I am getting java.lang.NullPointerException from Bursting program.
    Details of log file.
    Request ID: 6355955All
    Parameters: ReportRequestID=6355950:
    DebugFlag=YReport
    Req ID: 6355950Debug Flag: Y
    Updating request description
    Updated description
    Retrieving XML request informationNode Name:ORADB02
    Preparing parameters
    null output =/ora_code3/db04/db04comn/admin/out/db04_oradb02/o6355955.out
    inputfilename =/ora_code3/db04/db04comn/admin/out/db04_oradb02/o6355950.out
    Data XML File:/ora_code3/db04/db04comn/admin/out/db04_oradb02/o6355950.out
    Set Bursting parameters..Temp.
    Directory:/ora_code3/db04/db04comn/temp/[010808_021907137][][STATEMENT]
    Oracle XML Parser version ::: Oracle XDK Java 9.0.4.0.0 ProductionStart bursting process..[010808_021907140][][STATEMENT] /ora_code3/db04/db04comn/temp/[010808_021907146][][STATEMENT] BurstingProcessor ::: Property Key ---> burstng-source[010808_021907146][][STATEMENT] Inside burstingConfigParser[010808_021907150][oracle.apps.xdo.batch.BurstingProcessorEngine][STATEMENT] ========================> startElement() ::: startDocument is entered <========================--
    Exception
    null
    java.lang.NullPointerException     at oracle.apps.xdo.batch.BurstingProcessorEngine.burstingStartElement(BurstingProcessorEngine.java:1417)     at oracle.apps.xdo.batch.BurstingProcessorEngine.startElement(BurstingProcessorEngine.java:1110)     at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:167)     at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1182)     at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)     at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)     at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:227)
    Please help me.
    Thanks

  • Urgent help needed for XML Tags using XMLForest()

    Folks
    I need some urgent help regarding getting use defined tag in your
    XML output.
    For this I am using XMLElement and XMLForest which seems to work fine
    when used at the SQL prompt but when used in a procedure throws and error
    SQL> Select SYS_XMLAGG(XMLElement("SDI",
                                       XMLForest(sdi_num)))
         From sdi
         where sdi_num = 22261;- WORKS FINE
    But when used in a procedure,doesnt seem to work
    Declare
        queryCtx  DBMS_XMLQuery.ctxType;
        v_xml     VARCHAR2(32767);
        v_xmlClob CLOB;
        BEGIN
        v_xml:='Select SYS_XMLAGG(XMLElement("SDI",
                                             XMLFOREST(sdi_num)))
        From sdi
        where sdi_num = 22261';
        queryCtx :=DBMS_XMLQuery.newContext(v_xml);
        v_xmlClob :=DBMS_XMLQuery.getXML(queryCtx);
        display_xml(v_xmlClob);
    End;
    CREATE OR REPLACE PROCEDURE  display_xml(result IN OUT NOCOPY CLOB)
    AS
         xmlstr varchar2(32767);
         line varchar2(2000);
    BEGIN
         xmlstr:=dbms_lob.SUBSTR(result,32767);
         LOOP
         EXIT WHEN xmlstr is null;
         line :=substr(xmlstr,1,instr(xmlstr,chr(10))-1);
         dbms_output.put_line('.'||line);
         xmlstr := substr(xmlstr,instr(xmlstr,chr(10))+1);
         END LOOP;
    end;
    SQL> /
    .<?xml version = '1.0'?>
    .<ERROR>oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an
    XML tag name.</ERROR>
    PL/SQL procedure successfully completed.
    SQL>HELP is appreciated as to where I am going wrong?

    Hi,
    if you want to transform something to something else, you should declare, what is your source.
    I would prefer to use plain XSL-Transformations, because you have a lot more options to transform your source and you can even better determine, how your output should looks like.
    Kind regards,
    Hendrik

  • Need help in developing XML Publisher Report in Multi Language

    Hi Tim,
    We have requirement to develop XML Publisher report in Multi language.
    I know we can upload multiple Templates, one for each language.
    Can any one help me in knowing the process other than uploading multiple templates.
    Any documents or setup process related to this will be of great help.
    I appretiate your help.
    Thanks & Regards,
    Sahoo

    Hi,
    Lets say you have two smart styles with X and Y, and runtime based on the number of pages, if you would like to modify the style, then check any standard table or structue which holds and responsible for the holding the style value.
    If you can trace that, based on the coding we can modify accordingly.
    Regards,
    Santhosh.

  • Need help with Berkeley XML DB Performance

    We need help with maximizing performance of our use of Berkeley XML DB. I am filling most of the 29 part question as listed by Oracle's BDB team.
    Berkeley DB XML Performance Questionnaire
    1. Describe the Performance area that you are measuring? What is the
    current performance? What are your performance goals you hope to
    achieve?
    We are measuring the performance while loading a document during
    web application startup. It is currently taking 10-12 seconds when
    only one user is on the system. We are trying to do some testing to
    get the load time when several users are on the system.
    We would like the load time to be 5 seconds or less.
    2. What Berkeley DB XML Version? Any optional configuration flags
    specified? Are you running with any special patches? Please specify?
    dbxml 2.4.13. No special patches.
    3. What Berkeley DB Version? Any optional configuration flags
    specified? Are you running with any special patches? Please Specify.
    bdb 4.6.21. No special patches.
    4. Processor name, speed and chipset?
    Intel Xeon CPU 5150 2.66GHz
    5. Operating System and Version?
    Red Hat Enterprise Linux Relase 4 Update 6
    6. Disk Drive Type and speed?
    Don't have that information
    7. File System Type? (such as EXT2, NTFS, Reiser)
    EXT3
    8. Physical Memory Available?
    4GB
    9. Are you using Replication (HA) with Berkeley DB XML? If so, please
    describe the network you are using, and the number of Replica’s.
    No
    10. Are you using a Remote Filesystem (NFS) ? If so, for which
    Berkeley DB XML/DB files?
    No
    11. What type of mutexes do you have configured? Did you specify
    –with-mutex=? Specify what you find inn your config.log, search
    for db_cv_mutex?
    None. Did not specify -with-mutex during bdb compilation
    12. Which API are you using (C++, Java, Perl, PHP, Python, other) ?
    Which compiler and version?
    Java 1.5
    13. If you are using an Application Server or Web Server, please
    provide the name and version?
    Oracle Appication Server 10.1.3.4.0
    14. Please provide your exact Environment Configuration Flags (include
    anything specified in you DB_CONFIG file)
    Default.
    15. Please provide your Container Configuration Flags?
    final EnvironmentConfig envConf = new EnvironmentConfig();
    envConf.setAllowCreate(true); // If the environment does not
    // exist, create it.
    envConf.setInitializeCache(true); // Turn on the shared memory
    // region.
    envConf.setInitializeLocking(true); // Turn on the locking subsystem.
    envConf.setInitializeLogging(true); // Turn on the logging subsystem.
    envConf.setTransactional(true); // Turn on the transactional
    // subsystem.
    envConf.setLockDetectMode(LockDetectMode.MINWRITE);
    envConf.setThreaded(true);
    envConf.setErrorStream(System.err);
    envConf.setCacheSize(1024*1024*64);
    envConf.setMaxLockers(2000);
    envConf.setMaxLocks(2000);
    envConf.setMaxLockObjects(2000);
    envConf.setTxnMaxActive(200);
    envConf.setTxnWriteNoSync(true);
    envConf.setMaxMutexes(40000);
    16. How many XML Containers do you have? For each one please specify:
    One.
    1. The Container Configuration Flags
              XmlContainerConfig xmlContainerConfig = new XmlContainerConfig();
              xmlContainerConfig.setTransactional(true);
    xmlContainerConfig.setIndexNodes(true);
    xmlContainerConfig.setReadUncommitted(true);
    2. How many documents?
    Everytime the user logs in, the current xml document is loaded from
    a oracle database table and put it in the Berkeley XML DB.
    The documents get deleted from XML DB when the Oracle application
    server container is stopped.
    The number of documents should start with zero initially and it
    will grow with every login.
    3. What type (node or wholedoc)?
    Node
    4. Please indicate the minimum, maximum and average size of
    documents?
    The minimum is about 2MB and the maximum could 20MB. The average
    mostly about 5MB.
    5. Are you using document data? If so please describe how?
    We are using document data only to save changes made
    to the application data in a web application. The final save goes
    to the relational database. Berkeley XML DB is just used to store
    temporary data since going to the relational database for each change
    will cause severe performance issues.
    17. Please describe the shape of one of your typical documents? Please
    do this by sending us a skeleton XML document.
    Due to the sensitive nature of the data, I can provide XML schema instead.
    18. What is the rate of document insertion/update required or
    expected? Are you doing partial node updates (via XmlModify) or
    replacing the document?
    The document is inserted during user login. Any change made to the application
    data grid or other data components gets saved in Berkeley DB. We also have
    an automatic save every two minutes. The final save from the application
    gets saved in a relational database.
    19. What is the query rate required/expected?
    Users will not be entering data rapidly. There will be lot of think time
    before the users enter/modify data in the web application. This is a pilot
    project but when we go live with this application, we will expect 25 users
    at the same time.
    20. XQuery -- supply some sample queries
    1. Please provide the Query Plan
    2. Are you using DBXML_INDEX_NODES?
    Yes.
    3. Display the indices you have defined for the specific query.
         XmlIndexSpecification spec = container.getIndexSpecification();
         // ids
         spec.addIndex("", "id", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         spec.addIndex("", "idref", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // index to cover AttributeValue/Description
         spec.addIndex("", "Description", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_SUBSTRING, XmlValue.STRING);
         // cover AttributeValue/@value
         spec.addIndex("", "value", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // item attribute values
         spec.addIndex("", "type", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // default index
         spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // save the spec to the container
         XmlUpdateContext uc = xmlManager.createUpdateContext();
         container.setIndexSpecification(spec, uc);
    4. If this is a large query, please consider sending a smaller
    query (and query plan) that demonstrates the problem.
    21. Are you running with Transactions? If so please provide any
    transactions flags you specify with any API calls.
    Yes. READ_UNCOMMITED in some and READ_COMMITTED in other transactions.
    22. If your application is transactional, are your log files stored on
    the same disk as your containers/databases?
    Yes.
    23. Do you use AUTO_COMMIT?
         No.
    24. Please list any non-transactional operations performed?
    No.
    25. How many threads of control are running? How many threads in read
    only mode? How many threads are updating?
    We use Berkeley XML DB within the context of a struts web application.
    Each user logged into the web application will be running a bdb transactoin
    within the context of a struts action thread.
    26. Please include a paragraph describing the performance measurements
    you have made. Please specifically list any Berkeley DB operations
    where the performance is currently insufficient.
    We are clocking 10-12 seconds of loading a document from dbd when
    five users are on the system.
    getContainer().getDocument(documentName);
    27. What performance level do you hope to achieve?
    We would like to get less than 5 seconds when 25 users are on the system.
    28. Please send us the output of the following db_stat utility commands
    after your application has been running under "normal" load for some
    period of time:
    % db_stat -h database environment -c
    % db_stat -h database environment -l
    % db_stat -h database environment -m
    % db_stat -h database environment -r
    % db_stat -h database environment -t
    (These commands require the db_stat utility access a shared database
    environment. If your application has a private environment, please
    remove the DB_PRIVATE flag used when the environment is created, so
    you can obtain these measurements. If removing the DB_PRIVATE flag
    is not possible, let us know and we can discuss alternatives with
    you.)
    If your application has periods of "good" and "bad" performance,
    please run the above list of commands several times, during both
    good and bad periods, and additionally specify the -Z flags (so
    the output of each command isn't cumulative).
    When possible, please run basic system performance reporting tools
    during the time you are measuring the application's performance.
    For example, on UNIX systems, the vmstat and iostat utilities are
    good choices.
    Will give this information soon.
    29. Are there any other significant applications running on this
    system? Are you using Berkeley DB outside of Berkeley DB XML?
    Please describe the application?
    No to the first two questions.
    The web application is an online review of test questions. The users
    login and then review the items one by one. The relational database
    holds the data in xml. During application load, the application
    retrieves the xml and then saves it to bdb. While the user
    is making changes to the data in the application, it writes those
    changes to bdb. Finally when the user hits the SAVE button, the data
    gets saved to the relational database. We also have an automatic save
    every two minues, which saves bdb xml data and saves it to relational
    database.
    Thanks,
    Madhav
    [email protected]

    Could it be that you simply do not have set up indexes to support your query? If so, you could do some basic testing using the dbxml shell:
    milu@colinux:~/xpg > dbxml -h ~/dbenv
    Joined existing environment
    dbxml> setverbose 7 2
    dbxml> open tv.dbxml
    dbxml> listIndexes
    dbxml> query     { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }
    dbxml> queryplan { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }Verbosity will make the engine display some (rather cryptic) information on index usage. I can't remember where the output is explained; my feeling is that "V(...)" means the index is being used (which is good), but that observation may not be accurate. Note that some details in the setVerbose command could differ, as I'm using 2.4.16 while you're using 2.4.13.
    Also, take a look at the query plan. You can post it here and some people will be able to diagnose it.
    Michael Ludwig

  • Urgent help importing an XML file

    Hi all,
    I'm currently exporting my XML files from Magento, the webshop client. However I cannot use the XML task in ETL because I get the error about namedspaces. I can open the XML file itself no problem, it contains a few columns with data, some empty values.
    What I do to solve the error is create the script in ETL that converts the XML file so that I can make the SDX schema. The ETL script itself works 
    <?xml version="1.0" encoding="utf-8" ?> 
    <xsl:stylesheet version="1.0"         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
      <xsl:output method="xml" indent="no" /> 
      <xsl:template match="/|comment()|processing-instruction()"> 
        <xsl:copy> 
          <xsl:apply-templates /> 
        </xsl:copy> 
      </xsl:template> 
      <xsl:template match="*"> 
        <xsl:element name="{local-name()}"> 
          <xsl:apply-templates select="@*|node()" /> 
        </xsl:element> 
      </xsl:template> 
      <xsl:template match="@*"> 
        <xsl:attribute name="{local-name()}"> 
          <xsl:value-of select="." /> 
        </xsl:attribute> 
      </xsl:template> 
    </xsl:stylesheet> 
    But when I open the newly created file he looks really odd: See below for the initial file and the new file (based on how many times I open the file, i get another weird look...). Please help me out it's killing me :)

    Or you can apply a XSLT transform as per http://blogs.msdn.com/b/mattm/archive/2007/12/15/xml-source-making-things-easier-with-xslt.aspx
    Arthur My Blog

  • Urgent : Need help in parsing XML from Sharepoint and save it into DB

    Hi ,
    I am Sharepoint guy and a newbie in Oracle . PL/SQL
    I am using UTL_DBWS Package to call a Sharepoint WebService " and was sucessfull , Now the xml has to be parsed and stored into a Table. I am facing the issue as the XML has a different namesoace and normal XPATH query is not working
    Below is the XML and need help in parsing it
    declare
    responsexml sys.XMLTYPE;
    testparsexml sys.XMLTYPE;
    begin
    responsexml := sys.XMLTYPE('<GetListItemsResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
    <GetListItemsResult>
    <listitems xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
    <rs:data ItemCount="2">
    <z:row ows_MetaInfo="1;#" ows__ModerationStatus="0" ows__Level="1" ows_Title="Test Title 1" ows_ID="1" ows_owshiddenversion="1" ows_UniqueId="1;#{9C45D54E-150E-4509-B59A-DB5A1B97E034}" ows_FSObjType="1;#0" ows_Created="2009-09-12 17:13:16" ows_FileRef="1;#Lists/Tasks/1_.000"/>
    <z:row ows_MetaInfo="2;#" ows__ModerationStatus="0" ows__Level="1" ows_Title="Testing Tasks" ows_ID="2" ows_owshiddenversion="1" ows_UniqueId="2;#{8942E211-460B-422A-B1AD-1347F062114A}" ows_FSObjType="2;#0" ows_Created="2010-02-14 16:44:40" ows_FileRef="2;#Lists/Tasks/2_.000"/>
    </rs:data>
    </listitems>
    </GetListItemsResult>
    </GetListItemsResponse>');
    testparsexml := responsexml.extract('/GetListItemsResponse/GetListItemsResult/listitems/rs:data/z:row/@ows_Title');
    DBMS_OUTPUT.PUT_LINE(testparsexml.extract('/').getstringval());
    end;
    The issue is with rs:data , z:row nodes.... please suggest how to handle these kind of namespaces in Oracle
    I need the parse the attribute "ows_Title" and save it into a DB
    this script would generate "Error occured in XML Parsing"
    Help is appriciated, thanks for looking

    SQL> SELECT *
      FROM XMLTABLE (
              xmlnamespaces ('http://schemas.microsoft.com/sharepoint/soap/' as "soap",
                             '#RowsetSchema' AS "z"
              'for $i in //soap:*//z:row return $i'
              PASSING xmltype (
                         '<GetListItemsResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
    <GetListItemsResult>
    <listitems xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema">
    <rs:data ItemCount="2">
    <z:row ows_MetaInfo="1;#" ows__ModerationStatus="0" ows__Level="1" ows_Title="Test Title 1" ows_ID="1" ows_owshiddenversion="1" ows_UniqueId="1;#{9C45D54E-150E-4509-B59A-DB5A1B97E034}" ows_FSObjType="1;#0" ows_Created="2009-09-12 17:13:16" ows_FileRef="1;#Lists/Tasks/1_.000"/>
    <z:row ows_MetaInfo="2;#" ows__ModerationStatus="0" ows__Level="1" ows_Title="Testing Tasks" ows_ID="2" ows_owshiddenversion="1" ows_UniqueId="2;#{8942E211-460B-422A-B1AD-1347F062114A}" ows_FSObjType="2;#0" ows_Created="2010-02-14 16:44:40" ows_FileRef="2;#Lists/Tasks/2_.000"/>
    </rs:data>
    </listitems>
    </GetListItemsResult>
    </GetListItemsResponse>')
    columns ows_MetaInfo varchar2(20) path '@ows_MetaInfo',
             ows_Title varchar2(20) path '@ows_Title',
             ows__ModerationStatus varchar2(20) path '@ows__ModerationStatus'
    OWS_METAINFO         OWS_TITLE            OWS__MODERATIONSTATUS
    1;#                  Test Title 1         0                   
    2;#                  Testing Tasks        0                   
    2 rows selected.

  • Need help in displaying XML in JSP

    Hi there,
    i'm a newbi in XML and Java - I have the following prob, think for most of u nothing very difficult (or better thought so, I've posted this question in different forums here, but nobody answers :)
    I get an XML response from a search engine, now I want to display the search result in a jsp.
    The result is stored in the session [I hope I figured out correctly ;)]
    with the following command ->
    this.pageContext.getSession().setAttribute(SEARCHRESULT, dSearchResult);
    [its from the java class, which generates the result]
    Result example ->
    <?xml version="1.0" encoding="UTF-8"?>
    <FindSearchResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xml/SearchResult.xsd">
    <Result Hits="2" Name="OfficeLand_en_US">
    <Items>
    <Item Score="250">
    <Field FieldNo="0" Name="ProductID">KqvAqAB1Tq0AAADnFthtpZvC</Field>
    <Field FieldNo="1" Name="CatalogCategoryID">gh0KAAFvj3wAAADiW8SMtr6o</Field>
    </Item>
    <Item Score="250">
    <Field FieldNo="0" Name="ProductID">4rwKAAFvtNYAAADiwdCMtr6o</Field>
    <Field FieldNo="1" Name="CatalogCategoryID">gh0KAAFvj3wAAADiW8SMtr6o</Field>
    </Item>
    </Items>
    <HitDistribution>
    <Hit Hits="75" Score="0"/>
    <Hit Hits="2" Score="250"/>
    </HitDistribution>
    </Result>
    </FindSearchResult>
    How many 'Field' elements exist, depends on the query.
    The result example is a response, which is send to my JSP page. It is stored in an variable under the name SEARCHRESULT (it's the result of a query in a search engine).
    My JSP page is the page, which should display the searchresult.
    So i need to know, how to programm something in my JSP page to check the SEARCHRESULT to display not the whole xml file. I just want to display all Items (compare with result example) -> The name of each existing FieldNo, the Score and the HitDistribution.
    Please help me :)

    hi there,
    first create a xml schema for the xml you will be receiving.
    use jaxb or castor with the schema and create a class.
    in your jsp unmarshal the xml result you are getting with the class
    generated by either jaxb or castor. the class will have methods that return you the required elements.
    get to know xml schema better and just a pass thru of jaxb or castor will solve the problem.
    vedha_g

  • Help needed in XML Bursting to set printer details

    Hi,
    In xml bursting to set the printer details, we need to Specify the printer attribute as a URI such as:"ipp://myprintserver:631/printers/printername"
    Here I am getting printername dynamically from report. But I am
    not understanding "ipp://myprintserver:631/printers". Here What I have to give?
    Please help me in this.
    Thanks in advance.

    Which environment are you trying this in ? In Enterprise server, bursting is defined by a SQL query which can be run against the table that you want. So you can even populate the printer name from your query. So the URI, ipp://myprintserver:631/printers/printername" is the syntax. In your case you have to create this string in your SQL query by concatenating the parts "ipp://" + printername + ":631/". If there is a name to the printer in the printserver, then that too can be concatenated.
    In case this is in EBS , the same has to be done in the control file.

  • Help needed in XML

    We have xml like below.
    <?xml version="1.0" encoding="UTF-8" ?>
    <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi/">
    <xapi:request select="/XXARXSGPO/LIST_G_SETUP/G_SETUP/LIST_G_CUST_NUM/G_CUST_NUM">
    <xapi:delivery>
    <xapi:filesystem output="${INSTANCE}/java/oracle/apps/xxod/arstatements/${SITE_USE_ID}"/>
    </xapi:delivery>
    <xapi:document output-type= "pdf">
    <xapi:template type="rtf" location="/app/ebs/atgsidev02/gsidev02cust/xxcomn/java/oracle/apps/xxod/XXARPRST.rtf">
    </xapi:template>
    </xapi:document>
    </xapi:request>
    </xapi:requestset>
    In the above code {INSTANCE} is having value '/app/ebs/atgsidev02/gsidev02cust/xxcomn'. Now we need to replace with the same variable {INSTANCE} in the <xapi:template type=..........> tag also. We tried with
    <xapi:template type="rtf" location="${INSTANCE}/java/oracle/apps/xxod/XXARPRST.rtf">.
    But it is not recognizing the INSTANCE value.
    Any help on this appreciated.
    Thanks,
    Samba

    Hi,
    The INSTANCE is a tag and having the value '/app/ebs/atgsidev02/gsidev02cust/xxcomn'. So I need to pass this string dynamically to the
    <xapi:document output-type= "pdf">
    <xapi:template type="rtf" location="/app/ebs/atgsidev02/gsidev02cust/xxcomn/java/oracle/apps/xxod/XXARPRST.rtf">
    </xapi:template>
    </xapi:document>
    So for the above one I replaced the INSTANCE as follows.
    <xapi:document output-type= "pdf">
    <xapi:template type="rtf"
    location="${INSTANCE}/java/oracle/apps/xxod/XXARPRST.rtf">
    </xapi:template>
    </xapi:document>
    But this one is not working.
    Pls help me this is very high priority to me.
    Thanks,
    Samba

  • Help needed in XML bi publisher security side

    Hi all
    i have a requirement to set groups and access permissions to these groups for using XML publisher.
    am trying to find documents but i cant
    if anyone has experience please let me know
    appreciated

    Hi,
    Thanks for your help. I tried with that solution. But after page break I have another page which is like
    If you have any queries contact us
    Yours faithfully
    Emploee Name.
    This page is cominng repeatedly after each page break.
    Suppose If I give the variable value=4 then, this last page is coming one time for each page before the Invoice lines.
    Could you help me in this?
    Thanks

  • Help needed in XML encoders and decoders

    I'm using XMLEncoders and XMLDecoders for storage of java objects. Currently I've tried on simple data types only. But the problem is if I want to operate on the XMLEncoder created file from two different programs, then it is giving errors. In one program I'm executing
    XMLEncoder e = new XMLEncoder(new BufferedOutputStream
    (new FileOutputStream("polledobjects.xml")));
    e.writeObject(...);
    e.writeObject(...);
    e.close();
    and in another program I want to append to append a few more objects in the same polledobjects.xml, so I created another XML encoder object and opened the polledobjects.xml in append mode.
    XMLEncoder e1 = new XMLEncoder(new BufferedOutputStream(new
    FileOutputStream("polledobjects.xml",true)));
    e1.writeObject(...);
    e1.writeObject(...);
    e1.close();
    Now, Decoder works fine till the point it goes thru xml portion created by the first program, but as soon as it reached xml portion created by the second program, it gives the error->
    java.lang.ArrayIndexOutOfBoundsException: 2
    at java.beans.ObjectHandler.dequeueResult(XMLDecoder.java:272)
    at java.beans.XMLDecoder.readObject(XMLDecoder.java:150)
    at Convert.main(Convert.java:57)
    XML file created is :-
    <?xml version="1.0" encoding="UTF-8"?>
    <java version="1.4.2" class="java.beans.XMLDecoder">
    <object class="Data_to_Poll">
    <void property="active">
    <boolean>true</boolean>
    </void>
    <void property="agent">
    <string>192.9.200.151</string>
    </void>
    </object>
    </java>
    <?xml version="1.0" encoding="UTF-8"?>
    <java version="1.4.2" class="java.beans.XMLDecoder">
    <object class="Data_to_Poll">
    <void property="active">
    <boolean>true</boolean>
    </void>
    <void property="agent">
    <string>192.9.200.151</string>
    </void>
    </object>
    </java>
    I know it is giving problems b'cos it is encountering <?xml tag 2 times in the same xml document, but what should I do if I want to append in the same xml file and in the second program nothing more than filename is known...
    plz. help me out....

    In the below code hope "append" method may help u solve ur req.
    import java.io.*;
    import java.beans.*;
    import java.util.*;
    public class Convert {
    public static void main(String asd[]) {
    try{
    Convert c = new Convert();
    c.encode("source.xml");
    c.decode("source.xml");
    c.append("source.xml");
    }catch(Exception e) {
    e.printStackTrace();
    public void encode(String fName) throws FileNotFoundException {
    XMLEncoder xmlE = new XMLEncoder(new BufferedOutputStream(new FileOutputStream(fName)));
    xmlE.writeObject(new MyObject());
    xmlE.writeObject(new MyObject("Orange","BasketBall"));
    xmlE.close();
    /*xmlE = new XMLEncoder(new BufferedOutputStream(new FileOutputStream(fName,true)));
    xmlE.writeObject(new MyObject());
    xmlE.close();*/
    public void decode(String fName) throws FileNotFoundException {
    XMLDecoder xmlD = new XMLDecoder(new BufferedInputStream(new FileInputStream(fName)));
    Object obj = xmlD.readObject();
    boolean mine= obj instanceof MyObject;
    System.out.println(obj+" is : "+mine);
    xmlD.close();
    public void append(String fName) throws Exception {
    XMLDecoder xmlD = new XMLDecoder(new BufferedInputStream(new FileInputStream(fName)));
    Vector objs = new Vector();
    Object obj = xmlD.readObject();
    try{
    while(obj !=null){
    objs.add(obj);
    obj = xmlD.readObject();
    }catch(Exception e) {
    e.printStackTrace();
    if(obj!=null) {
    objs.add(obj);
    xmlD.close();
    XMLEncoder xmlE = new XMLEncoder(new BufferedOutputStream(new FileOutputStream(fName)));
    int count = objs.size();
    for(int i=0;i<count;++i) {
    xmlE.writeObject(objs.get(i));
    xmlE.writeObject(new MyObject("White","VollyBall"));
    xmlE.close();

  • Help needed in XML Form Builder

    Hi All,
    I require your help in XML form .
    when we create a XML form in Builder we can define some caption values such as $sap_user , $ locDate which displays the
    user id and date in the respective field when the form is opened.
    I need to dispaly the phone number,department etc from the LDAP /UME to my from .
    How can i get it .
    Please help.
    Regards,
    Nitesh

    Which environment are you trying this in ? In Enterprise server, bursting is defined by a SQL query which can be run against the table that you want. So you can even populate the printer name from your query. So the URI, ipp://myprintserver:631/printers/printername" is the syntax. In your case you have to create this string in your SQL query by concatenating the parts "ipp://" + printername + ":631/". If there is a name to the printer in the printserver, then that too can be concatenated.
    In case this is in EBS , the same has to be done in the control file.

  • Help required in xml to xml Mapping

    Hi guys,
    While performing mapping between two message types, where my input message type looks like..
    <?xml version="1.0" encoding="UTF-8"?>
    <DATA>
    <FNAME>
    <LNAME>
    <DATA>
    and I'm using both the FNAME and LNAME nodes in the output file.
    Here If I'm giving the input file format as...
    <?xml version="1.0" encoding="UTF-8"?>
    <DATA>
    <FNAME>Varun</FNAME>
    <DATA>
    This is without the LNAME tag...
    I want to know, how can I assign a blank value to my output file structure for this particular tag???
    I tried using a custom mapping with the code written below, but it didn't work
    public String matchFields(String a,Container container){
       //write your code here
    String output;
    if(a""l)
    output = "";     
    else
    output = a;
    return output;
    Please help me on this guys....Plzzz
    Regards
    Varun

    Hi,
    use it like this if Fname equals constnat[space] then pass the Constant[space] to Fname else value of Fname as under
    ................................Constant[]------>
    FNAME.............................................Then
    >Equals....................................IF -
    >FNAME
    Constant[].........................................ELSE
    .......................................FNAME---->   
    Constant[]    = Constant [ Space ]
    Sachin

Maybe you are looking for