Obtain XML info

Hi,
I have this XML
<td>
&#8722;<a href={code"/servlet/CRManManif?CMc1_Anno=2008&CMc1_Numero=1792&CG_cadu=118&viat=1&CMc1_Terminal=&TipM=mc">
<text>08 - 1792</text>
</td>
&#8722;
<td align="center">
<text>01/08/2008</text>
</td>
&#8722;
<td align="center">
<text>03/08/2008</text>
</td>
&#8722;
<td>
<text>CSAV RIO TOLTEN </text>
</td>I need to save the info in <a href={code
I knoq how to get the info of the other elements but this info I dont know how
My code is this
public Test() throws SAXException, IOException {
          // TODO Auto-generated constructor stub
          xr = XMLReaderFactory.createXMLReader();
          xr.setContentHandler(this);
          xr.setErrorHandler(this);
          String sFichero = "C:\\Documents and Settings\\Nueva\\Escritorio\\Peru\\Manif.txt";
          bw = new BufferedWriter(new FileWriter(sFichero));
     public void leer(final String archivoXML) throws FileNotFoundException,
               IOException, SAXException {
          FileReader fr = new FileReader(archivoXML);
          xr.parse(new InputSource(fr));
     String contenido = ""; // cadena para almacenar el contenido de un tag
     public void startDocument() throws SAXException {
          System.out.println("Inicio del Xml");
     public void endDocument() throws SAXException {
          System.out.println("Fin de Xml");
          try {
               bw.close();
          } catch (IOException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
     public void startElement(String uri, String localName, String qName,
               Attributes attributes) {
          //System.out.println("Etiqueta :" + qName);
     public void characters(char buf[], int offset, int len) throws SAXException {
          contenido = new String(buf, offset, len);
     public void endElement(String uri, String localName, String qName) {
          contador++;
          try {
               if (qName.equals("td")) {
                    uno = contenido;
                    bw.write(uno);
                    contA = contador;
                    System.out.println("entro");
               if (qName.equals("a")) {
                    dos = contenido;
                    bw.write(dos);
                    contB = contador;
                    System.out.println("entro2");
               if (qName.equals("text")) {
                    tres = contenido;
                    bw.write(tres);
                    contC = contador;
                    System.out.println("entro3");
               if(contC == (contB -1) && contB == (contA -1)){
                    System.out.println(contenido);
          } catch (IOException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
     }If someone can Help me...
Thanks a lot

Hi !
Well, I'm not sure of that, but I guess you're not using the proper method to call for the WS.
As I can notice it in the stacktrace, the method called is "getInputStream" from HTTPURLConnection. And if I remember well, this method simply opens the pointed location and tries to fetch the file.
The WS behaves another way, in the sense it may be waiting for some input information to be posted. Try to make your call in a different way, using SAAJ for instance (the closest means to the way you're calling it, I guess).
I really don't know if I enlighted your path, but I hope so.
See ya.

Similar Messages

  • Rss feed check - feedvalidator not giving .xml info

    I want to view the .xml info for my feed
    http://lawofattraction.podOmatic.com/rss2.xml
    I know it validates but I use podomatic to create my feed then change it so I can post it the way I want it on Itunes.
    Feedvalidator used to give you validate but also list the .xml so I could fiddle with the contents. My brain is fried right now - how do I view this code? Help! Karen

    Feedvalidator doesn't display the code if it can't find anything to criticize - take it as a compliment.
    Control-click on the URL you give for the feed, and choose 'Download linked file' or equivalent. When downloaded, drag it to the TextEdit icon. When you have modified it, save it with the same name, and TextEdit will ask you whether you want to add .txt to the end - decline the offer.
    However, though I'm not familiar with Podomatic, if it's an online service you may have problems changing the feed - they generally don't allow you access to it. Whether you can upload your changed file I don't know, nor whether there is in fact a way of getting into the Podomatic version of it.

  • Which table will have Page(XML) info

    After importing say TestPG.XML using import command, where to check whether this page is imported not. Where is the MDS info r stored?

    As for the question on which tables are used, there are four:
    APPLSYS.JDR_ATTRIBUTES, APPLSYS.JDR_COMPONENTS, APPLSYS.JDR_PATHS and APPLSYS.JDR_ATTRIBUTES_TRANS.
    You are much better off using the JDR utils to see if it has posted. I used the following to see if something I recently imported worked properly:
    DECLARE
    BEGIN
    jdr_utils.listdocuments ('/oracle/apps/ar/cusstd/acctoview', TRUE);
    END;

  • Pulling XML info with URL

    I'm messing around with parsing data from an XML. I'm trying to pull data form the WoW armory page (yes I'm an addict :). If you go to the page and select view source you can see the XML, however when I try using URL and a buffer to output the data to the console, I will get the HTML code. I'm not sure why this is happening therefore not sure what I need to try to get the actual XML data. My best guess is that it will only output the XML if i'm using the browser. When I looked this up I found info on how to do it with cold fusion and it was mentioned to try setting the User Agent to Firefox or IE. Not sure if this is done with java.
    Here's the Code I'm using:
         URL wow = new URL("http://www.wowarmory.com/item-info.xml?i=12042");
         BufferedReader in = new BufferedReader(new InputStreamReader(wow.openStream()));
         StringBuffer xmlBuffer = new StringBuffer();
         String inputLine;
         inputLine = in.readLine();
         while(inputLine != null)
              System.out.println(inputLine);
              inputLine = in.readLine();
         }If anyone can give me a push in the right direction I'd appreciate it. Thanks!

    your onRelease is going to be lost because it's defined for a
    loadMovie target. either wait until loading is complete to define
    your mouse handler or load into a child movieclip.

  • DHCP Client not setting obtained nameserver info

    Solaris 8
    The dhcpagent file was modified so that the nameserver info is requested: PARAM_REQUEST_LIST=1,3,6,12,43
    By default, #6 was missing. After a boot, running dhcpinfo and requesting the data for #6, results in three IP addresses being displayed.
    The problem is that those three values are not set anywhere, so no resolving is done. If I manually place the values into resolv.conf, then resolving works. Obviously I need this to happen automatically.
    Any clues as to what to do so that automatic configuration of nameserver info obtained via DHCP will be appreciated.
    Thanks in advance
    MB

    Having multiple DIFFERENT nameserver addresses is fine, it will just try them in sequence. But I see no point in having the same IP repeated and that might be a bad thing relative to performance (or it might be smart enough to ignore duplicates)
    As for the .plist files, no idea. Since the Cisco VPN is not using system prefs I don't think that would be an issue, but don't know what these files are really used for. i also tired the same setup (installing the Cisco VPN) on a system that has not been touched in ages (an old mac cube server as my backup/media server) and it had the same result. That leads me to think it is something on the remote end, yet my linux box connects and sets its nameserver just fine. I don't recall just when this started happening, maybe its a 10.4.10 issue (at least both Macs are on 10.4.10) ???

  • How to obtain XML error node after  XML validation

    Hello,
    We are developing a web application which uses XML documents.
    We try to obtain the exact error which occurs during XML validation against a schema in order to alert users with a proper message - for example: "Invalid value for element date".
    We validate our XML documents using DBMS_xmlparser. But it only retuns a string message indicating there is an error and document cannot be validated. What can we use to reference to the node object which contains the error?
    We develop our application under Oracle 9.2.0.4.
    Any help will be appreciated.

    Validate with a DOMParser or a SAXParser.
    Set a ErrorHandler on the parser.
    The custom ErrorHandler class should override the startElement & endElement methods of the DefaultHandler class.
    private class Validator extends DefaultHandler     
           public boolean  validationError = false;     
           public SAXParseException saxParseException=null;
           public void error(SAXParseException exception) throws SAXException     
               validationError = true;     
               saxParseException=exception;
           public void fatalError(SAXParseException exception) throws SAXException          
                validationError = true;     
                saxParseException=exception;     
           public void warning(SAXParseException exception) throws SAXException          
           public void startElement(String uri,
                             String localName,
                             String qName,
                             Attributes attributes)
                      throws SAXException{
             System.out.println("Start Element: "+qName);
             public void endElement(String uri,
                           String localName,
                           String qName)
                    throws SAXException{
             System.out.println("End Element: "+qName);

  • Getting XML info with ABAP mapping

    Hi everyone.
    I'm near to finish my abap mapping demo. The problem is that i don't know how i can retrieve the values of a kind of node.
    I would like to retrieve this data into a internal table. I've done the output XML.
    How can i get that values from SOURCE parameter into an internal table?
    Regards.

    Hi!
    First of all you have a little bit of XML parsing to do using the SIXML package in ABAP (see example reports in same dev class).
    Then you can travers your "document" with methods like
    get_elements_by_tag_name or get_root_element.
    There are also 2 function modules to convert a document into an ABAP internal table.
    SDIXML_DATA_TO_DOM and SDIXML_DOM_TO_DATA.
    Regards
    Michael

  • Error obtaining complete info from db

    i want to obtaining data such as "New York" from the database. however, it only shows "New" instead of "New York" in the text field. what's my mistake?
    // edit.jsp
    HttpSession sess = request.getSession(true);
    String ID = (String) sess.getValue("uic"); // will select all the data to the fields
    String txtUname = "", txtState= ;
    String sDB="db", sUsr= "", sPwd="";
    String sSQL = "SELECT * FROM tbl WHERE Uname = '" + ID + "';";
    try {
    while(Rs.next()) {
         txtUname = Rs.getString("Uname");
         txtState= Rs.getString("State");
    <form name = "frm" method="POST" action="UsrProfile.jsp">
    <table border="1" width="75%" height="183" align = "center">
    <tr>
    <td width="21%" height="23">Username:</td>
    <td width="84%" height="23"> <input type="text" name="txtUname" readonly = "readonly" size="73" value=<%= txtUname %>></td>
    </tr>
    <tr>
    <td width="21%" height="23">State:</td>
    <td width="84%" height="23"> <input type="text" name="txtState" size="73" value=<%= txtState%>></td>
    </tr>
    <input type="button" value="Save Changes" name="btnSaveEdit" onClick = "doModify()">
    // Modify.jsp
    String name = request.getParameter("txtName");
    String state = request.getParameter("txtState");
    .................. // Open db, SQL, etc
    }

    Hi,
    The cause for the pointed message is that WebLogic configuration files are defined by a schema. When parsing these files, they are validated against the schema. This warning indicates that there were problems found during validation. The problems may or may not be fatal depending on the setting of the system property weblogic.configuration.schemaValidationEnabled.
    To disable the schema validation use the flag -Dweblogic.configuration.schemaValidationEnabled=false so your module can be loaded correctly.
    Once you set their Parameter in startup script restart the server.
    Note: also clear cache and tmp folder for specific server.
    Regards,
    Kal

  • Obtaining more info from contact us form?

    We set up a form to collect user profile information using a generic contact form which collects a username and an image for their profile picture. Since we didn't use a custom crm field, there's no export a list of usernames and matching profile pictures. Instead we need to go into each contact one by one to view what photo they uploaded as their profile picture and create an excel file manually. Is there any easier way to obtain the information?

    Hi,
    Unfortunately I cannot see another way for existing records.  Perhaps removing the current contact form and updating it to include the fields you require for all future submissions. 
    Kind regards,
    -Sidney

  • HELP! Submitting XML info to Itunes

    Help! I'm trying so hard to find out how I can edit the XML information. Even with a text editor. How do you edit the information and add your icon. I have seen the technical pages it tells you how to do it but from iweb where do you access the XML stuff?? Please help!!!
    Dual 2.0 gig computer   Mac OS X (10.4.1)  

    I tried that and did update everything, I pulled out the episode from Itunes and posted it into iweb and republished iweb. Next I went to submit my podcat to itunes the first page comes up with people walking on a beach where I want my logo to go and doesn't give me anywhere to add the discription. Then I click on that page it takes me to Itunes where I can submit my podcasts. It says I have to edit my RSS feeds? where do I do that?
    Thanks so much for the help!!

  • Obtaining RMA info, and my customer service experie

    Well, I guess after i sent one furious message after being asked the third time to send my RMA information, they decided to stop sending me pre-written responses and just ignored me.
    What can I do now to get my RMA info? Thanks.
    Message Edited by silus on 02-5-2005 02:6 PM

    I have no clue how the Creative Labs customer service works...
    I first contacted Creative Labs because my earpiece was falling apart after the 3rd week, and made it clear that I was not going to send my entire player when they could simply send out a replacement set, but they told me that this was not possible. That was Jan 30th.
    From then the problems with the player started adding up (battery, headphone jack), so I agreed to send out my player and gave the information about the new problems and other personal info for the RMA. Jan 5th. Then after a couple of days I was just asked the same exact question...to email my personal information.... after an angry response, my emails were basically ignored, and I had to come here to request the help of the moderators.
    Now it is Jan 5th and I get an email saying, "Replacement earphones are being sent to you."
    WTF?

  • I lost some of my contacts from both my iphone 5 and ipad I for no reason at all...how can I obtain the info back?

    I woke up one morning this week to find that some of my contacts have been deleted from my iphone 5 and ipad first generation. This is very random and my icloud is not showing the missing numbers either. Does anyone know if there are any other back ups that apple has to the contact lists? or How I can retrieve them?

    Do you see those in www.icloud.com? Yes- sign in to icloud on the phone.
    No- how did you get those to the ipad?

  • Obtaining document info using categories/perspectives as search criteria

    Hi, I'm really stuck on this and any help would be much appreciated.
    I want to select out document information using the categories and perspectives as search criteria, I've written the following select statement but am not sure that this is the correct way to do it and I keep getting a 'unhandled user-defined exception ... at PORTAL.WWCTX_SSO'
    (I have set the context before running the sql)
    select id, display_name, description, real_filename, mime_type, doc_size
    from
    portal.wwsbr_all_items, portal.wwv_document$
    where
    wwsbr_all_items.filename = wwv_document$.name
    and category_id=(select id from portal.wwsbr_all_categories where name = 'MY_CATEGORY')
    and id in (select item_id from portal.wwsbr_item_perspectives where upper(perspective_name) = 'MY_PERSPECTIVE')
    and is_current_version = 1 and (expiredate IS NULL or expiredate > sysdate)
    Alison

    Hi Alison,
    I just tried your query in SQL* Plus, TOAD & Oracle Portal - Dynamic Page & PL?SQL Item. I set the context ( as given int he Documentation ) using :-
    PORTAL.wwctx_api.set_context('PORTAL','JKuNcME9','Oracle');I then tried your code & it works fine. I don't see the usual ORA-06510: PL/SQL: unhandled user-defined exception.
    Your logic does look fine - I haven't tired something like this with Categories & Perspectives, but your query looks fine to me. I'll try to snoop around Metalink & see what I get...
    Regards,
    Sandeep

  • Obtaining signature info

    Greetings all. Using the CLI (or from the shell) on an IPS v 5.0 sensor, can anyone detail a quick way to generate a listing of all signatures and their corresponding information (sig-id, subsig-id, sig-name, engine name, SigStringInfo, etc…).
    I understand this information can be gleaned via ‘service signature-definition sig0’ but I was hoping to find an alternative method to get it all quickly in one shot. Ultimately, my goal is to write some custom scripts to parse it and output it into a more presentable format (Excel for example). Thanks in advance for any assistance.

    There is no CLI method for getting what you are looking for. Contact me directly at [email protected]

  • T540-System Update- Win7 64bit - An error occurred while gathering user info-HelloLevel_9_12_00.xml

    When attempting to do a Lenov System update, the error message "An error occurred while gathering user information" is displayed.
    Upon review the of the tvsu_*.log, it appears there is an issue with the lenovo website when it tries to pull down the following config file:
    https://download.lenovo.com/ibmdl/pub/pc/pccbbs/agent/SSClientCommon/HelloLevel_9_12_00.xml
    Has anyone else had a similar issue and been able to resolve?
    Info    2014-12-16 , 10:26:08
        at Tvsu.Engine.Process.HelloProcess.DownloadUDF(String helloClientLevel)
        Message: The UDF will be downloaded from: https://download.lenovo.com/ibmdl/pub/pc/pccbbs/agent/SSClientCommon/HelloLevel_9_12_00.xml
    Info    2014-12-16 , 10:26:08
        at Tvsu.Engine.Process.HelloProcess.DownloadUDF(String helloClientLevel)
        Message: The UDF will be downloaded to-> C:\ProgramData\Lenovo\SystemUpdate\session\system\SSClientCommon\HelloLevel_9_12_00.xml
    Info    2014-12-16 , 10:26:08
        at Tvsukernel.CustomControls.Step.<>c__DisplayClass7.<set_Image>b__6()
        Message: Setting PROCESSING status.
    Info    2014-12-16 , 10:26:08
        at Tvsu.ConnectionSettings.ConnectionSettings.GetConnectionForURL(String url)
        Message: Creating a new Connection Settings Bean instance to Host: download.lenovo.com
    Info    2014-12-16 , 10:26:08
        at Tvt.ConnectionSettings.ConnectionSettings.GetConnectionForURL(String url)
        Message: Direct connection found
    Info    2014-12-16 , 10:26:08
        at Tvsu.FileDownloader.HttpsDownload.GetProxy(ConnectionSettingsBean connBean)
        Message: Connection type set to DIRECT in ConnectionSettingsBean
    Severe    2014-12-16 , 10:26:08
        at Tvsu.FileDownloader.HttpsDownload.Init(FileDownloadInfo fileInfo)
        Message: Debug Log: Init method:GET
    Severe    2014-12-16 , 10:26:10
        at Tvsu.FileDownloader.HttpsDownload.doDownloadByHttps(FileDownloadInfo fileInfo, downloadingDelegate downDelegate)
        Message: Debug Log: doDownloadByHttps InterException is null, uri:https://download.lenovo.com/ibmdl/pub/pc/pccbbs/agent/SSClientCommon/HelloLevel_9_12_00.xml
    Severe    2014-12-16 , 10:26:10
        at Tvsu.FileDownloader.HttpsDownload.doDownloadByHttps(FileDownloadInfo fileInfo, downloadingDelegate downDelegate)
        Message: Debug Log doDownloadByHttps webException message:The remote server returned an error: (404) Not Found.
    Severe    2014-12-16 , 10:26:10
        at Tvsu.FileDownloader.HttpsDownload.doDownloadByHttps(FileDownloadInfo fileInfo, downloadingDelegate downDelegate)
        Message: Debug Log server path: https://download.lenovo.com/ibmdl/pub/pc/pccbbs/agent/SSClientCommon/HelloLevel_9_12_00.xml responseStatus:404
    Severe    2014-12-16 , 10:26:10
        at Tvsu.FileDownloader.HttpsDownload.doDownloadByHttps(FileDownloadInfo fileInfo, downloadingDelegate downDelegate)
        Message: Debug Log server path: https://download.lenovo.com/ibmdl/pub/pc/pccbbs/agent/SSClientCommon/HelloLevel_9_12_00.xml webException.StackTrace:   at System.Net.HttpWebRequest.GetResponse()
       at Tvsu.FileDownloader.HttpsDownload.doDownloadByHttps(FileDownloadInfo fileInfo, downloadingDelegate downDelegate)
    Info    2014-12-16 , 10:26:10
        at Tvsu.Engine.Process.HelloProcess.Start()
        Message: UDF download status is -> Failed
    Thanks
    Karl

    Hi,
    in this situation try following:
    open registry:
    HKLM\Software\Wow6432Node\Software\Lenovo\System Update\Preferences\UCSettings\RunTime
    check if the informations are correct.
    In case not, then correct them.
    - Try to run TVSU as Administrator (right-click on it and select Run as Administrator)
    In case this will be of no use, then just go into the install folder of TVSU and there you will see the folder called "Logs". In there you will for sure find the exact information on what went wrong. Perhaps some proxy config, or just the server was unavailable.
    Cheers

Maybe you are looking for

  • Windows Vista Ipod Nano drivers??

    When I connect my iPod nano 4gb to my new laptop, with iTunes 7 installed, it tells me it needs to install drivers and insert CD...but I dont have the CD! Can anyone give me a link for these drivers at all, or give me adivice on how to get around thi

  • How to handle the popup windows in e-tester.

    Hi, We are currently using the e-Tester by using record/playback on Facebook. During recording as part of functionality we have encountered some confirmation popups (Which are not ordinary windows popups). Actions on those popups (confirm/cancel) are

  • Wrong Additional Customs Duty in PO & MIGO

    Hi, We have created a Purchase Order. By mistake we maintained the Additional Customs Duty in the Purchase Order. We did the Goods Receipt. While doing the Invoicing (MIRO), we came to know about this problem. Please advice what to do now with the Du

  • Maintanance project release

    Hi, my solution manager project is ZCHARM4 project type is Maintanance ChanRM 4.0 in solar_project_admin transaction,in the Project cycle  tab..when i click on the project cycle its giving the following message. sap The project is not released. Hence

  • Editing Lecture VHS--sufficient or not

    Hello, we are new mac users and have a program to digitalize hundreds of VHS. We did some survey and now try to use hardwares like D/A convertor to capture video from Svhs vcr, and imac. These video tapes are only lectures of our master, single shot