URGENT: Need help reading URL of current page

Hello kind people!
I need help, and its very simple:
How do i read the URL of a web page?
For example, the URL of this page is:
http://forums.sun.com/thread.jspa?threadID=5327796
So how can i be able to read in this URL in my java program?
thanks SO MUCH
P.S. I HAVE searched the java docs and everything, the closest thing i found was request.getRequestURL().? but i have no idea how to use it. you have NO IDEA how appreciative i would be if you could simply show me exactly how to read in the URL of a given page.
thanks SO MUCH
Edited by: homegrownpeas on Aug 31, 2008 5:19 PM

Going by what I understand here is a simple version of how you can read data from over HTTP.
This expects the "page" to be text (hence an InputStreamReader instead of an InputStream.)
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.HashMap;
* GPLv2.
* @author karlm816
public class HomeGrownPeas {
      * @param args
     public static void main(String[] args) {
          HashMap<String, String> params = new HashMap<String, String>();
          params.put("threadID", "5327796");
          System.out.println(loadHttpPage("http://forums.sun.com/thread.jspa", params));     
     public static String loadHttpPage(String sUrl, HashMap<String, String> params) {
          // Build the HTTP request string
          StringBuilder sb = new StringBuilder();
          if (params != null) {
               for (String key : params.keySet()) {
                    if (sb.length() > 0) {
                         sb.append("&");
                    sb.append(key);
                    sb.append("=");
                    sb.append(params.get(key));
          System.out.println("params: " + sb.toString());
          try {
               URL url = new URL(sUrl);
               URLConnection connection = url.openConnection();
               connection.setDoOutput(true);
               connection.setRequestProperty("Content-Length", "" + sb.length());
               connection.setUseCaches(false);
               if (connection instanceof HttpURLConnection) {
                    HttpURLConnection conn = (HttpURLConnection) connection;
                    conn.setRequestMethod("POST");
               OutputStreamWriter osw = new OutputStreamWriter(connection.getOutputStream());
               osw.write(sb.toString());
               osw.close();
               // Now use sb to hold the resutls from the request
               sb = new StringBuilder();
               BufferedReader in = new BufferedReader(
                     new InputStreamReader(
                     connection.getInputStream()));
               String s;
               while ((s = in.readLine()) != null) {
                    sb.append(s);
                    // To make it more "human readable"
                    sb.append("\n");
               in.close();
         } catch (IOException e) {
              e.printStackTrace();
              return null;
        return sb.toString();
}

Similar Messages

  • Urgent Need Help - APEX URL can't work when computer conncects to Internet

    I have installed APEX on my computer. But APEX can't use until computer works offline.
    If I connect to internet. Using following URL
    http://localhost:8080/apex
    I get below message.
    Internet Explorer cannot display the webpage
    I also use IP address/computer name to test, it doesn’t work either.
    But If I work offline, APEX can work.
    I tried to disable IPv6 on my computer, but it still doesn't work.
    My OS is Win7. I changed my OS recently, last OS was Windows XP and APEX worked correctly.
    Can anyone help for this?
    Thank you in advance.

    Disable proxy configuration for your localhost (or add as an exception thru Manual configuration). Your network is not finding your host when researching the path (in the internet) to reach it.

  • Urgently need help with this

    Hi!!
    I urgently need help with this:
    When I compile this in Flex Builder 3 it says: The element type 'mx:Application' must be terminated by the matching end-tag '</mx:Application>'.
    but I have this end tag in my file, but when I try to switch from source view to desgin view it says, that: >/mx:Script> expected to terminate element at line 71, this is right at the end of the .mxml file. I have actionscript(.as) file for scripting data.
    This is the mxml code to terminate apllication tag which I did as you can see:
    MXML code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#007200, #000200]" width="1024" height="768" applicationComplete="popolni_vse()">
    <mx:HTTPService id="bazaMME" url="lokalnabaza/baza_MME_svn.xml" showBusyCursor="true" resultFormat="e4x"/>
    <mx:Script source="dajzaj.as"/>
    <mx:states>
    <mx:State name="Galerije">
        <mx:SetProperty target="{panel1}" name="title" value="Galerije MME"/>
        <mx:SetProperty target="{panel2}" name="title" value="opis slik"/>
        <mx:SetProperty target="{panel3}" name="title" value="Opis Galerije"/>   
        <mx:AddChild relativeTo="{panel1}" position="lastChild">
        <mx:HorizontalList x="0" y="22" width="713.09863" height="157.39436" id="ListaslikGalerije"></mx:HorizontalList>
                </mx:AddChild>
                <mx:SetProperty target="{text1}" name="text" value="MME opisi galerij "/>
                <mx:AddChild relativeTo="{panel1}" position="lastChild">
                    <mx:Label x="217" y="346" text="labela za test" id="izbr"/>
                </mx:AddChild>
                <mx:SetProperty target="{label1}" name="text" value="26. November 2009@08:06"/>
                <mx:SetProperty target="{label1}" name="x" value="845"/>
                <mx:SetProperty target="{label1}" name="width" value="169"/>
                <mx:SetProperty target="{Gale}" name="text" value="plac za Galerije"/>
            </mx:State>
            <mx:State name="Projekti"/>
        </mx:states>
    <mx:MenuBar id="MMEMenu" labelField="@label" showRoot="true" fillAlphas="[1.0, 1.0]" fillColors="[#043D01, #000000]" color="#9EE499" x="8" y="24"
             itemClick="dajVsebino(event)" width="1006.1268" height="21.90141">
           <mx:XMLList id="MMEmenuModel">
                 <menuitem label="O nas">
                     <menuitem label="reference podjetja" name="refMME" type="check" groupName="one"/>
                     <menuitem label="reference direktor" name="refdir" type="check" groupName="one"/>
                  <menuitem label="Kontakt" name="podatMME" groupName="one" />
                  <menuitem label="Kje smo" name="lokaMME" type="check" groupName="one" />
                 </menuitem>           
                 <menuitem type="separator"/>
                 <menuitem label="Galerija">
                     <menuitem label="Slovenija" name="galSvn" type="check" groupName="one"/>
                     <menuitem label="Nemčija" name="galDeu" type="check" groupName="one" />
                 </menuitem>
                 <menuitem type="separator"/>
                 <menuitem label="projekti">
                     <menuitem label="Slovenija" name="projSvn" type="check" groupName="one"/>
                     <menuitem label="Nemčija" name="projDeu" type="check" groupName="one" />
                     <menuitem label="Madžarska" name="projHun" type="check" groupName="one"/>
                 </menuitem>
             </mx:XMLList>                       
             </mx:MenuBar>
        <mx:Label x="845" y="10" text="25. November 2009@08:21" color="#FFFFFF" width="169" height="18.02817" id="label1"/>
        <mx:Label x="746" y="10" text="zadnja posodobitev:" color="#FFFFFF"/>
        <mx:Panel x="9" y="57" width="743.02814" height="688.4507" layout="absolute" title="Plac za Vsebino" id="panel1">
            <mx:Text x="0" y="-0.1" text="MME vsebina" width="722.95776" height="648.4507" id="Gale"/>
        </mx:Panel>
        <mx:Label x="197.25" y="748.45" color="#FFFFFF" text="Copyright © 2009 MME d.o.o." fontSize="12" width="228.73239" height="20"/>
        <mx:Label x="463.35" y="748.45" text="izdelava spletnih strani: FACTUM d.o.o." color="#FBFDFD" fontSize="12" width="287.60565" height="20"/>
        <mx:Panel x="759" y="53" width="250" height="705.07043" layout="absolute" title="Plac za hitre novice" id="panel3">
            <mx:Text x="0" y="0" text="MME novice" width="230" height="665.07043" id="text1"/>
            <mx:Panel x="-10" y="325.35" width="250" height="336.61972" layout="absolute" title="začasna panela" color="#000203" themeColor="#4BA247" cornerRadius="10" backgroundColor="#4B9539" id="panel2">
                <mx:Label x="145" y="53" text="vrednost" id="spremmen"/>
                <mx:Label x="125" y="78" text="Label"/>
                <mx:Label x="125" y="103" text="Label"/>
                <mx:Label x="0" y="53" text="spremenljivka iz Menuja:"/>
                <mx:Label x="45" y="78" text="Label"/>
                <mx:Label x="45" y="103" text="Label"/>
            </mx:Panel>
        </mx:Panel>
        <mx:Label x="9.9" y="10" text="plac za naslov MME vsebine" id="MMEnaslov" color="#040000"/>
         </mx:states></mx:Application>

    I know it's been a while but… did you fix this?
    It looks to me like you are terminating the <mx:Application> tag at the top. The opening tag should end like this: resultFormat="e4x">, not resultFormat="e4x"/> (Remove the /).
    Carlos

  • Urgently  need help for parsing IP header

    Hi, could anyone tell which class I should use to parsing the IP header of a packet?
    Thanks many many times!

    > Hi, could anyone tell which class I should use to
    parsing the IP header of a packet?
    DatagramPacket?
    > Urgently need help for parsing IP header
    Don't flag your question as urgent, even if it is for you.
    * We all answer questions here voluntarily, in our leisure time. We do that because doing so is fun for us, because we enjoy helping people and having interesting discussions. Guess what, it is much less fun if it gets stressful. So the last thing you want to do to get us to answer your question is to pass your stress over to us.
    * People who are stressed and want a fast answer often don't even find the time to do the necessary research or to formulate their question in an easy to comprehend way. That's even less fun to work with. So you really don't want us to feel your stress. Instead you want to take your time to write a well formulated post that is fun to answer. The less likely it is for us to know that your question is urgent, the more likely you are to get a fast answer!
    * The simple notion that you want your post to be answered faster than those of the other members might feel rather unfair to some of us. Doubly so because often "urgent" questions actually are homework questions. Yours might be different, but someone who had bad experiences with this type of question might not read far enough to notice.

  • Need help accessing the router web page.  I have been tol...

    Need help accessing the router web page.  I have been told my router is acting like a switch and the IP address is not in the proper range.  I have tried reseting the router (hold for 30 sec and unplug for 5 mins).  Didn't work.
    thanks

    What router are you using?  Almost all Linksys routers use 192.168.1.1 as the default local IP address, but there is at least one that uses 192.168.16.1 , namely the WTR54GS  (not the WRT54GS).
    You need to try again to reset the router to factory defaults.
    To reset your router to factory defaults, use the following procedure:
    1) Power down all computers, the router, and the modem, and unplug them from the wall.
    2) Disconnect all wires from the router.
    3) Power up the router and allow it to fully boot (1-2 minutes).
    4) Press and hold the reset button for 30 seconds, then release it, then let the router reset and reboot (2-3 minutes).
    5) Power down the router.
    6) Connect one computer by wire to port 1 on the router (NOT to the internet port).
    7) Power up the router and allow it to fully boot (1-2 minutes).
    8) Power up the computer (if the computer has a wireless card, make sure it is off).
    9) Try to ping the router. To do this, click the "Start" button > All Programs > Accessories > Command Prompt. A black DOS box will appear. Enter the following: "ping 192.168.1.1" (no quotes), and hit the Enter key. You will see 3 or 4 lines that start either with "Reply from ... " or "Request timed out." If you see "Reply from ...", your computer has found your router.
    10) Open your browser and point it to 192.168.1.1. This will take you to your router's login page. Leave the user name blank (note: a few Linksys routers have a default user name of "admin" (with no quotes)), and in the password field, enter "admin" (with no quotes). This will take you to your router setup page. Note the version number of your firmware (usually listed near upper right corner of screen). Exit your browser.
    If you get this far without problems, try the setup disk (or setup the router manually, if you prefer), and see if you can get your router setup and working.
    If you cannot get "Reply from ..." in step 9 above, your router is dead.
    If you get a reply in step 9, but cannot complete step 10, then either your router is dead or the firmware is corrupt. In this case, use the Linksys tftp.exe program to try to reload your router with the latest firmware. After reloading the firmware, repeat the above procedure starting with step 1.
    If you need additional help, please state your ISP, the make and model of your modem, your router's firmware version, and the results of steps 9 and 10. Also, if you get any error messages, copy them exactly and report back.
    Please let me know how things turn out for you.
    Message Edited by toomanydonuts on 01-21-2008 04:40 AM

  • Need help reading burn CDR mp3 and dvdrw from my superdrive

    my Super Drive was fine untill i upgrade to Maverick now it wouldnt  read the music on all of my burn cdr disk and dvdrw . ALso .need help  reading my external 2TB External Ntfs Hard drive.....

    To many conflicting information...
    my Super Drive was fine untill i upgrade to Maverick
    Per your system profile: "Mac mini, Mac OS 9.1.x"
    Mac Minis do not have a superdrive.  You also posted in the Intel iMac forums.
    Please correct and/or update so that you will be provided w/the correct troubleshooting suggestions.

  • Need help creating URL for getImage

    In the following code example, I get an error when javac compiling. I need help, because I cannot determine what is wrong. "....." denotes extraneous code removed for readability.
    import java.awt.*;
    import java.io.*;
    import java.applet.*;
    import java.net.*;
    public class testapp extends java.applet.Applet implements java.lang.Runnable
    public static void main(String[] argv)
    ����.
    public void init()
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    Image image1 = toolkit.getImage("imageFile.gif");
    Image image2 = toolkit.getImage( new URL("http://java.sun.com/graphics/people.gif"));
    ��
    javac reports:
    unreported exception java.net.MalformedURLException; must be caught or declared to be thrown
    Image image2 = toolkit.getImage( new URL ("http://java.sun.com/graphics/people.gif"));
    ................................................^

    With this recommended code:
    ===================
    try {  Image image2 = toolkit.getImage( new URL  ("http://java.sun.com/graphics/people.gif"));}catch(MalformURLExceptione){System.out.println("Error"); }
    ======================
    it now compiles ok, but when I access the page through the browser, I get "applet not initialized" and the page times out.
    With the lines commented out, the page loads.
    What does this tell us:
    - all we have done is mask a problem that the compiler previously highlighted.
    But what is the problem?
    As far as I can tell, the code is exact copies from the examples posted online.
    Where should System.out.println("Error"); be displayed? I can't find it. There might be a clue in the error message.

  • HELP! Need help generating TEXT-ONLY portal page...

    Text Only Portal Question:
    PLATFORM:
    =================================================================
    Sun Solaris (5.2 if memory serves) for db and mid-tier, running
    8.1.7 DB and 3.0.9 (1.0.2.2) portal.
    THE NEED:
    =================================================================
    I need to display text only portal pages. Some of the more
    detailed concerns at this point are below. Also, I've had an open
    tar on Metalink for about two weeks, and after research from
    their end has resulted in no help.
    THE ISSUES (so far):
    =================================================================
    IMAGES:
    If an anchor [A HREF=...] tag uses an image as it's "text", I
    need to strip out the ALT= text to show inside the anchor. If no
    ALT text is available, then I would like to show the image name
    as a default.
    For example:
    <img src=home.gif
    alt=Home>
    should display as:
    Home
    FORMS:
    How do I get the resulting page from a form (which include the
    login inputs and submit button, search box, advanced search page,
    etc.) to be displayed by the text only page?
    For example:
    When a form is called, the <FORM> elements are as follows:
    METHOD=GET or POST
    ACTION=url (relative or absolute) to the script.
    In this case, the action value is:
    ACTION=/servlet/page?
    pageid=6&dad=portal30&_schema=PORTAL30.
    This calls the advanced search API.
    I would expect that to redirect the browser back to some
    text-only version, the ACTION= element would have to be changed
    to be something like:
    ACTION=[pathscraper]?/servlet/page?
    pageid=6&dad=portal30&_schema=PORTAL30
    REDIRECTION:
    What happens when portal pages redirect internally? How do you
    get back to the text-only page?
    For example:
    The login link on the standard Oracle Portal home page flips
    from url to url to get to the actual login page. Our
    implementation of Oracle portal goes from
    [DOMAIN]/pls/portal30_sso/portal30_sso.wwsso_app_admin.ls_login
    to [domain]/pls/portal30_sso/portal30_sso.login_page.
    Since this is standard Oracle redirection, how can it be
    intercepted so the portal30_sso.login_page can be presented as
    text only?
    TRIED SO FAR:
    =================================================================
    I've written a socket/text scraper in Perl, running it from a web
    server. The problems mentioned above are really causing problems,
    plus the whole cookie thing. Since Oracle Portal tries to push a
    cookie to the client, when the client is another UNIX server,
    the cookie thing doesn't work.
    POSSIBLE OTHER SOLUTIONS:
    =================================================================
    Something...anything. I've tried to think of some method to
    create some sort of PL/SQL procedure to catch the content then
    strip out the HTML calls.
    An Applet to do the same thing, but on the client side, but
    since time is an issue, coding a complete Java applet isn't
    really an option.
    THE CONCLUSION:
    =================================================================
    HELP! I need some help. This is for a client that is government
    funded, and to meet Section 508 (part of the Americans with
    Disabilities Act that states web sites and applications must be
    made accessible. A text-only page is one of the requirements for
    an accessible page.
    Thanks,
    Ryan Stefani
    ps: feel free to contact me via [email protected] or
    [email protected]

    Use Find/Change and the GREP tab.
    Search for .+ and set the Find formatting to find the charcteristics you want.
    What will you do with this text once found? You'll need something to "change" to, either new text or Change Formatting options...

  • Need help in writing a .jsp page

    Hi Guys,
    I am new to JSP. My requirement is " I have a link on my webpage. When the user clicks that link, a HTML page is displayed which has parameters to be entered (for ex: from_date , to_date). When the user clicks the submit button, a jsp page should be displayed in which a query is run to display the output. For example, the user enters the from_date and to_date parameter values to know the employees employed within those dates in their company. The query is "select empname,empno,sal,dept,comm from emp where employed_date between from_date and to_date" . The following should run and display in the jsp page.
    How can i write a .jsp to extract the parameters that are entered in the HTML form in to a .jsp and run the query with those parameters to display the output. Help needed in making me write this .jsp for this query.
    Help Aprreciated.
    Thanks

    Hm, your requirements sound like homework assignment from classroom. If so, is itn't better that you find the answer youself? There are plenty of very relevant references for how to use jsp to handle html forms or talk to a rdbms through a jdbc connection. For example, for jsp and html forms, you can google "jsp html forms"; for jsp and sql query, search for "jsp jdbc".
    Tell me if this is not helpful.

  • Need Help:Reading Data from RU payroll cluster for table GRREC

    Hi...
    I need help on how to read data from RU cluster table for table GRREC for the employee & run date and get the value from structure PC292 .
    Please let me know about the includes and the import and export statements to be used.
    Thanks in advance,
    RAVI.

    Hi,
    Here goes pseudocode
    Includes:
    include: rpppxd00    ,
                rpppxd10     ,
                rpc2cd09     , 
                rpc2rx02_ce , "if ldb pnp_ce is used else use the same include with out _ce
                rpc2rx29      ,  
                rpc2rx39      ,
                rpppxm00    ,
                rpc2ruu0_ce ,
    Declare:
    DATA : i_rgdir   LIKE pc261        OCCURS 0 WITH HEADER LINE     ,
               i_result  TYPE pay99_result OCCURS 0 WITH HEADER LINE ,
               i_grrec   LIKE  pc292           OCCURS 0 WITH HEADER LINE .
    start-of-selection:
    GET pernr.
    Get the RGDIR VALUE for the current PERNR & selected Molga
    get rgdir data TABLES i_rgdir
                          USING pernr-pernr
                                     p_molga " parameter
    CD-KEY-PERNR = PERNR-PERNR.
    RP-IMP-C2-CU.
    i_rgdir [] = rgdir[].
      LOOP AT i_rgdir WHERE fpbeg  LE  pn-endda
                        AND fpend  GE  pn-begda
                        AND srtza  EQ 'A'
                        AND void   NE   'V'.
      get_result_tabs   TABLES i_result
                                   USING 'RU'    "  US cluster
                                         pernr-pernr
                                         i_rgdir-seqnr
          RX-KEY-PERNR = PERNR-PERNR.
          UNPACK i_RGDIR-SEQNR TO RX-KEY-SEQNO.
          RP-IMP-C2-RU.
      i_grrec[] = i_result-inter-grrec[].
      LOOP AT i_grrec.
      case i_grrec.
      use wage types required here and pass the data to output table.
      endcase.
      endloop.
      endloop
    end-of-selction.

  • Need help on Oracle APEX- Retaining Page items of one Session in another

    Hi,
    I am creating an apex application in which there exist two pages. Out of 2 pages, I need to provide authentication on one page and no authentication on the other one.
    When I access the first page by public, I must pass some page items to the second page. Since, I have aunthentication on page 2, there will be a new session created and I could not retain the page items that are passed from Page 1 to Page2.
    Please help me in retaining the page item values of Page1 in Page2.
    Thanks for your help.

    Hi Andy,
    I have passed the values from page 2 to page 3. Due to Authentication on Page 3, the passed values are cleared and a new session created.
    Is there a way to retain the item values using Application items or Application computations?
    Please help.
    Thanks,
    Hanu.

  • ComboBox (dropdown) Need Help Adding URL links!!!

    I am somewhat of a newbie....Anybody know how to use URL
    links in a ComboBox dropdown menu? NEED HELP!!!!!!! I'm trying to
    make it so that after selecting an option, the user is directed to
    another URL within the same browser window. Using flash 8!
    Thanks,

    Im a bit a newbie myslef but i think you make flash
    commuincate to javascript wich will make the browser goto the URL.
    do a search on getURL and javascript together and i am sure
    you will find something.
    And when slecting to redirct i think its on?(onPress)
    something so maybe look throught the help section in flash 8 and
    look at componets. I think there is some actionscript help there.
    Sorry i could not be more helpful.

  • On my MacBook Pro I forgot my user password and I didn't enable Apple ID recoveries and I urgently need help finding a way to recover the password.

    I urgently require help in recovering my user password for my MacBook Pro on OS X Lion, I forgot my password and Apple ID recoveries aren't enabled and I can't enable them as I don't know my password and my hint didn't help me at all, I really, really need help!

    Also, a solution may be found if you search in the "More Like This" section over in the right column.Solution may be found if you search in the "More Like This" section over in the right column.

  • [Urgent] Need help calculating difference between two dates

    I'm trying to write a code to display the current day and time, then accept two dates from the user and display the difference between the two dates. To display the current date and time, I've used the SimpleDateFormatter library but I'm having difficulty calculating the difference between two dates. Could someone please help me with this?
    Below is my code so far
    import java.util.Date;
    import java.util.Scanner;
    import java.text.SimpleDateFormat;
    public class DateFormatter {
         public void displayNow()
              Date todaysDate = new Date();
              SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MMM-dd HH:mm:ss");
              String formattedDate = formatter.format(todaysDate);
              System.out.println("Today's date and time is: "+formattedDate);
         public void calculateDifference(Date startDate, Date endDate)
              /* This is whre i need help! */
         public static void main(String[] args)
              DateFormatter df = new DateFormatter();
              Scanner sc = new Scanner(System.in);
              df.displayNow();
              System.out.println("Please enter a date: ");
              String date1 = sc.next();
              System.out.println("Please enter another date: ");
              String date2 = sc.next();
    }The methods displayNow() and calculateDifference(Date startDate, Date endDate) are essential and cannot be skipped out.

    tarahmarie101 wrote:
    Dude. I've tried doing assignments under pressure, and it doesn't work. Here's a piece of free advice. Start earlier next time, don't put "urgent" in the title of your post b/c it just pisses people off around here--and is a sure sign of an overdue homework assignment which no one around here likes helping with, and try to ask intelligent questions--don't just say "Help me!"
    Of course, it takes some time to learn what the intelligent questions are. You have my sympathy. Try asking questions about how to do a particular task, instead of asking people to tell you what to do. It starts to get easier after a while.
    actually dude i started on this on monday.. but there were so many other stuff to do along with this.. and i did try referring up the Calendar utility but it was a bit confusing actually.. it was only after that did i come to this forum.. nor am i very good at Java.. anyhoo thanks for your sympathies :P

  • 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.

Maybe you are looking for

  • Javaw does not work for my SWING application

    Dear all, I try to use 'javaw ClassName' (from a batch test.bat) to hide command prompt window when a Swing application starts. Unfortunately, the CMD still appears. So I recommend the command java and javaw has no difference in my situation. I use j

  • Report Version 4 since Leopard Update...I can not use Ichat anymore

    Hi, It seems that there is many pb with Ichat since Leopard, does anybody know what is wrong, I think I tried everything - turn off sharing internet - change the ports - change the bandwith - add Ichat into the security etc... Any help will be apprec

  • Where are BW Datasources physically/actually stored in the SAP system

    Hi, We are making some changes which are to be moved to the BI production system. There are a couple of concerns which have arised. So we need to know where all the changes including CMOD changes, SAP notes and BW Datasources are physically stored in

  • Error while running hz_cust_account_site_v2pub.update_cust_site_use

    Hi All, I am getting below error while trying to update the location on the customer sites. "This record in table hz_cust_site_uses cannot be locked as it has been updated by another user." i am using below script for update "/* Formatted on 2013/01/

  • AGMac-Change "Chapter" and "Section" concepts...

    Hello, I started a new book in iBooks Author 2.0 and I renamed the chapter header in my language (Greek)... In any iBooks document there are also the concepts of "Chapter" and "Section"... For example in the "Table of contents" exists at the top "Cha