Search Results

Search found 3176 results on 128 pages for 'parsing'.

Page 19/128 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • XML Parsing Error: no element found

    - by Anilkumar
    XML Parsing Error: no element found Line Number 1, Column 1: I want to download a Excel file. I wrote the data in a html table format and appending to the response. The code is following : Response.Buffer = false; Response.Expires = 0; Response.Clear(); Response.ContentType = "application/vnd.ms-excel"; Response.AddHeader("Content-Disposition", "attachment; filename=" + FileName); Response.Write(str); Response.End();

    Read the article

  • Parse Domain from a given URL in T-SQL

    - by Adam N
    I fount this answer, but wanted to expand on the question and couldn't find any solutions here on stack or through searching google. Substring domainname from URL SQL Basically the link above solves my problem with a simple URL like parsing "www.google.com" with the result of google. What I am looking for to expand on that is the solution from the link above doesn't help with url's like 'www.maps.google.com' that just returns maps. WHat I would like is to have it return 'google' from the url 'www.maps.google.com' or return 'example' from 'www.test.example.com'. If anyone has a solution to this, I would greatly appreciate it. Update: To be more specific I will also need parsing on second level domains etc. 'www.maps.google.com.au' to return 'google' Here is my Sql function. CREATE FUNCTION [dbo].[parseURL] (@strURL varchar(1000)) RETURNS varchar(1000) AS BEGIN IF CHARINDEX('.', REPLACE(@strURL, 'www.','')) > 0 SELECT @strURL = LEFT(REPLACE(@strURL, 'www.',''), CHARINDEX('.',REPLACE(@strURL, 'www.',''))-1) Else SELECT @strURL = REPLACE(@strURL, 'www.','') RETURN @strURL END

    Read the article

  • Having trouble parsing itunes affiliate xml...

    - by MKDev
    Hi, I am trying to parse an itunes affiliate xml link purely for practise, using NSXMLParser but the link will not parse. The itunes affiliate xml link is this: http://itunes.apple.com/au/rss/topsongs/limit=50/genre=20/xml?partnerId=2003&TD_PARAM=http%3A%2F%2Fclkuk.tradedoubler.com%2Fclick%3Fp%3D23708%26a%3D1904172%26url%3D. it works perfectly in safari on my mac. The normal itunes link I tried parsing: http://itunes.apple.com/%@/rss/%@/limit=50/genre=20/xml works perfectly with the NSXMLParser. Can anyone tell me why this is happening? Thanks in advanced. MKDev

    Read the article

  • Remove newline character while XML parsing

    - by Prashant
    Hi, I am facing a problem while XML parsing. I have an NSMutablestring currentElementValue that has newlines into it. It has been received as an XMl from a web source. Even when i am trying to remove newline charactersets of substring the first 3 char there is no effect on the string. What can be done here? Regards PC Code is (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { if(!currentElementValue) currentElementValue = [[NSMutableString alloc] initWithString:string]; else { [currentElementValue substringFromIndex:3]; [currentElementValue stringByTrimmingCharactersInSet:[NSCharacterSet newlineCharacterSet]]; NSLog(@"Processing Value : %@ with length %d", currentElementValue,[currentElementValue length] ); }

    Read the article

  • JSONP parsing error from WCF

    - by user1754730
    Answered my own question I had a problem with a jquery (jsonp) call to a WCF service that was throwing a json parsing error. Using ASP.NET 4.0 on the WCF side and jquery 1.7 on the client side. Turned out there was an old set of script tags on the page using language = VBSCRIPT. The browser was interpreting the returned json packet of script as "VBscript" instead of javascript. I placed a set of empty javascript tags at the top of the page and the browser is now interpreting the json as the proper javascript function. Hope this helps someone else. Tom

    Read the article

  • PHP: Parsing of a given form input variable

    - by Jaime Cross
    How would I go about parsing incoming form data where the name changes based on section of site like: <input type="radio" name="Motorola section" value="Ask a question"> where 'Motorola section may be that, or Verizon section, or Blackberry section, etc. I do not have any control over changing the existing forms unfortunately, so must find a way to work with what is there. Basically, I need to be able to grab both the name="" data as well as its coresponding value="" data to be able to populate the email that gets sent properly.

    Read the article

  • RFC822 Timezone Parsing in Java

    - by Jamen
    Hi, I have a JS date that is being converted by Dojo into RFC822 format. The function call - dojo.date.toRfc3339(jsDate), generates the following date - 2007-02-26T20:15:00+02:00. I have an application that uses a Java date SimpleDateFormat to parse in the dates generated above. I am having problems parsing this date format due to the timezone. I have attempted to use yyyy-mm-DD'T'hh:mm:ssZ This fails as the 'Z' for timezone doesn't expect a ':' character. Does anyone know how I would specify a pattern to handle a RFC822 date with the ':'? Thanks Jamen

    Read the article

  • DocumentBuilder.parse() / Parsing Entities

    - by stormin986
    I'm new to parsing XML and am having an issue with entities. (Am doing this on Android, if it makes a difference). Is there a way to have it turn an entity into the character it represents? I have this in the child of an element: "isn&#39;t" (minus quotes). I would prefer it parse it and the end result be a single text node. However, right now this is turned in to TEXT, ENTITY, TEXT. Is there a way to automatically have it parse the entity into text, or a manual way to do it?

    Read the article

  • (Python) Extracting Text from Source Code?

    - by zhuyxn
    Currently have a large webpage whose source code is ~200,000 lines of almost all (if not all) HTML. More specifically, it is a webpage whose content is a few thousand blocks of paragraphs separated by line breaks (though a line break does not specifically mean there is a separation in content) My main objective is to extract text from the source code as if I were copying/pasting the webpage into a text editor. There is another parsing function I would like to use, which originally took in copied/pasted text rather than the source code. To do this, I'm currently using urllib2, and calling .get_text() in Beautiful Soup. The problem is, Beautiful Soup is leaving tremendous amounts of white space in my code, and it is difficult to pass the result into the second "text" parser. I have done quite a bit of research on parsing HTMLs, but I'm frankly not sure how to solve this problem easily. Furthermore, I'm a bit confused on how to use imports like lxml to extract text as if I were to simply copy and paste?

    Read the article

  • "Parse Error : There is a problem parsing the package" while installing Android application

    - by Raghavendra
    I got this error while installing the android application (Parse Error : There is a problem parsing the package.). I did the following steps. First time I installed the application and it works fine. I made changes to the existing application and change the version no in Manifest file. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.openintents.samples.BasicOpenARDemo" android:versionCode="2" android:versionName="1.0.1"> Then I export the application and finish the code signing process. For this, Right Click your Project node select Export. There you will see a wizard. Follow the steps and finish the code signing also. I got the ARDemo.apk file, Then I changed it’s name to ARDemo1.apk Then I shipped this apk file to mobiles SD Card and started the installation I got the above error. I googled, they say that problem with unpacking manifest file. Can anyone tell me what could be wrong with me?

    Read the article

  • JASON parsing using soap request and response

    - by hardik
    hello all in my project i want to use JASON parsing my sample soap request and response is here below please guide me how can i do that // soap request // <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns9093="urn:outmarket"><SOAP-ENV:Body><ns9093:doStartup xmlns:ns9093="urn:outmarket"><username xsi:type="xsd:string">guest</username><password xsi:type="xsd:string">guest</password></ns9093:doStartup></SOAP-ENV:Body></SOAP-ENV:Envelope> // soap response // <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:doStartupResponse xmlns:ns1="urn:outmarket"><return xsi:type="xsd:xml"><isvaliduser>1</isvaliduser><userid>19</userid><cansubmitphoto>0</cansubmitphoto><cansubmitcomment>0</cansubmitcomment><cansubmitrating>0</cansubmitrating><cansubmitmarket>0</cansubmitmarket><cansubmitstallholder>0</cansubmitstallholder><databaseid>1</databaseid><markets><markettype>1</markettype><marketid>3</marketid><marketname><![CDATA[Bairnsdale Farmers Market]]></marketname><ratingname><![CDATA[Market in general]]></ratingname><good>0</good><neutral>0</neutral><bad>0</bad></markets><markets><markettype>0</markettype><marketid>3</marketid><marketname><![CDATA[Bairnsdale Farmers Market]]></marketname><ratingname><![CDATA[Market in general]]></ratingname><good>25</good><neutral>0</neutral><bad>18</bad></markets><markets><markettype>0</markettype><marketid>5</marketid><marketname><![CDATA[Bendigo Farmers' Market]]></marketname><ratingname>`

    Read the article

  • Parsing and getting specific values from CSV string

    - by Amit Ranjan
    I am having a string in CSV format. Please see my earlier question http://stackoverflow.com/questions/2865861/parsing-csv-string-and-binding-it-to-listbox I can add new values to it by some mechanism. Everything will be same except the new values will have numeric part = 0. Take example I have this exsiting CSV string 1 , abc.txt , 2 , def.doc , 3 , flyaway.txt Now by some mechanism i added two more files Superman.txt and Spiderman.txt to the existing string. Now it became 1 , abc.txt , 2 , def.doc , 3 , flyaway.txt, 0, Superman.txt, 0 , Spiderman.txt What i am doing here is that this csv string is paased into SP where its splitted and inserted to db. So for inserting I have to take the files with numeric part 0 only rest will be omiited .Which will be further then converted into CSV string Array will look like this str[0]="1" str[1]="abc.txt" str[2]="2" str[3]="def.doc " str[4]="3" str[5]="flyaway.txt" str[6]="0" str[7]="Superman.txt" str[8]="0" str[9]="Spiderman.txt" So at last i want to say my input will be 1 , abc.txt , 2 , def.doc , 3 , flyaway.txt, 0, Superman.txt, 0 , Spiderman.txt Desired Output: 0, Superman.txt, 0 , Spiderman.txt

    Read the article

  • Parsing third-party XML

    - by mare
    What path would you took to parse a large XML file (2MB - 20 MB or more), that does not have a schema (I cannot infer one with XSD.exe because the file structure is odd, check the snippet below)? Options 1) XML Deserialization (but as said, I don't have a schema and XSD tool complains about the file contents), 2) Linq to XML, 3) loading into XmlDocument, 4) Manual parsing with XmlReader & stuff. This is XML file snippet: <?xml version="1.0" encoding="utf-8"?> <xmlData date="29.04.2010 12:09:13"> <Table> <ident>079186</ident> <stock>0</stock> <pricewotax>33.94000000</pricewotax> <discountpercent>0.00000000</discountpercent> </Table> <Table> <ident>079190</ident> <stock>1</stock> <pricewotax>10.50000000</pricewotax> <discountpercent>0.00000000</discountpercent> <pricebyquantity> <Table> <quantity>5</quantity> <pricewotax>10.00000000</pricewotax> <discountpercent>0.00000000</discountpercent> </Table> <Table> <quantity>8</quantity> <pricewotax>9.00000000</pricewotax> <discountpercent>0.00000000</discountpercent> </Table> </pricebyquantity> </Table> </xmlData>

    Read the article

  • PHP DOM vs SimpleXML for Atom GData feed parsing

    - by Geoff Adams
    I'm building a library to access the Google Analytics Data Export API. All the data the library accesses is in Atom format and utilises numerous different namespaces throughout. My experiments with the API have used SimpleXML for parsing so far, especially as all I have been doing is accessing the data held within the feed. Now I'm coming to write a library I am wondering whether forging ahead with SimpleXML will be adequate or whether the enhanced functionality of the DOM module in PHP would be of benefit in the future. I haven't written much code for this part of the library yet so the choice is still open. I have read that the PHP DOM module can be a better choice if you need to build an XML DOM on the fly or modify an existing one, but I'm not entirely sure I would need that functionality anyway due to the nature of the API (no pushing data to the server, for instance). SimpleXML is certainly easier to use and I have seen people saying that for read-only situations it is all you need. Essentially the question is, what would you use? Compatibility will not be an issue as the server configuration will match the application's requirements. Is it worth building the library with PHP DOM in mind or should I stick with SimpleXML for now? Update: Here are two examples of the kind of feeds I will be dealing with: Account feed Data feed

    Read the article

  • Apache is sending php files to my browser instead of parsing

    - by justen doherty
    i have to setup php on an existing web host, i have made a virtual host entry but for some reason apache is sending the php to the browser instead of parsing.. from googling around it looks like its a problem with the mimetypes, but im not an apache expert by any means - so if anyone can help it would be appreciated... i have the following in my httpd.conf AddHandler php5-script php DirectoryIndex index.html index.phtml index.php index.phps AddType application/x-httpd-php .phtml AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps the php module is loaded into apache: /usr/sbin/apachectl -M Loaded Modules: core_module (static) mpm_prefork_module (static) http_module (static) so_module (static) auth_basic_module (shared) auth_digest_module (shared) authn_file_module (shared) authn_alias_module (shared) authn_anon_module (shared) authn_dbm_module (shared) authn_default_module (shared) authz_host_module (shared) authz_user_module (shared) authz_owner_module (shared) authz_groupfile_module (shared) authz_dbm_module (shared) authz_default_module (shared) ldap_module (shared) authnz_ldap_module (shared) include_module (shared) log_config_module (shared) logio_module (shared) env_module (shared) ext_filter_module (shared) mime_magic_module (shared) expires_module (shared) deflate_module (shared) headers_module (shared) usertrack_module (shared) setenvif_module (shared) mime_module (shared) dav_module (shared) status_module (shared) autoindex_module (shared) info_module (shared) dav_fs_module (shared) vhost_alias_module (shared) negotiation_module (shared) dir_module (shared) actions_module (shared) speling_module (shared) userdir_module (shared) alias_module (shared) rewrite_module (shared) proxy_module (shared) proxy_balancer_module (shared) proxy_ftp_module (shared) proxy_http_module (shared) proxy_connect_module (shared) cache_module (shared) suexec_module (shared) disk_cache_module (shared) file_cache_module (shared) mem_cache_module (shared) cgi_module (shared) version_module (shared) fcgid_module (shared) perl_module (shared) php5_module (shared) proxy_ajp_module (shared) ssl_module (shared) and this is my virtual host entry: ServerName viridor-cms.co.uk ServerAlias www.viridor-cms.co.uk UseCanonicalName Off DocumentRoot /var/www/vhosts/viridor-cms.co.uk/httpdocs CustomLog /var/www/vhosts/viridor-cms.co.uk/cms-access_log common ErrorLog /var/www/vhosts/viridor-cms.co.uk/cms-error_log DirectoryIndex index.php index.html php_admin_flag engine on php_admin_flag safe_mode on php_admin_flag engine on php_admin_flag safe_mode on AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps please help, my head is so sore from banging it againest the table and the wall !

    Read the article

  • PHP Magento SOAP-ERROR: Parsing WSDL: Couldn't load from urlpath

    - by dan.codes
    I am trying to create a soap client by passing a url that is hosted on my local machine, my dev environment and I keep getting this error. I use to be able to make this call and it worked just fine. Basically all I am doing is this $client = new SoapClient('http://virtual.website.com:81/api/?wsdl'); If I go to the url in a browser it comes up, so I know it is the right location. On the Magento forums there are some similar posts but I don't know that this is a Magento specific problem. Everything they mention as a solution I already have. They say to edit the hosts file for example 127.0.0.1 website.com I already have this since it is setup as a virtual host. Here is the error in my error_log [Fri Jun 04 12:30:37 2010] [error] [client 127.0.0.1] PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://virtual.website.com:81/api/soap/?wsdl' : XML declaration allowed only at the start of the document\n in /usr/local/sites/virtual.website.com/www/CUSTOMSCRIPTS/removeProductImages.php on line 6 [Fri Jun 04 12:30:37 2010] [error] [client 127.0.0.1] PHP Stack trace: [Fri Jun 04 12:30:37 2010] [error] [client 127.0.0.1] PHP 1. {main}() /usr/local/sites/virtual.website.com/www/CUSTOMSCRIPTS/removeProductImages.php:0 [Fri Jun 04 12:30:37 2010] [error] [client 127.0.0.1] PHP 2. SoapClient->SoapClient(*uninitialized*) /usr/local/sites/virtual.website.com/www/CUSTOMSCRIPTS/removeProductImages.php:6

    Read the article

  • Parsing the first image src of a list

    - by zurna
    I need to parse a value from an xml and place it to image's src field. I tried parsing it as $(".photoBox img").append(ImageSmURL); and I got <img src="" alt="">/FLPM/media/images/0E7Q9Z0C_sm.jpg/FLPM/media/images/2A9L1V2X_sm.jpg</img> how do I do it so the result will be as... <img src="/FLPM/media/images/0E7Q9Z0C_sm.jpg" alt="" /> My xml <Images> <ImageID id="63"> <ImageSmURL>/FLPM/media/images/5V2G4Q5S_sm.jpg</ImageSmURL> <ImageLgURL>/FLPM/media/images/5V2G4Q5S.jpg</ImageLgURL> </ImageID> <ImageID id="64"> <ImageSmURL>/FLPM/media/images/5Y2K4T5V_sm.jpg</ImageSmURL> <ImageLgURL>/FLPM/media/images/5Y2K4T5V.jpg</ImageLgURL> </ImageID> </Images>

    Read the article

  • Lift XML Parsing Error

    - by bstevens90
    I know there are other questions on this and I have read through almost all of them and none of them solved my problem. I have inside a home directory: def search(in: NodeSeq) : NodeSeq = { bind("work", in, "docId" -> text("", did = _), "visitId" -> text("", vid = _), "provider" -> text("", prov = _), "emCode" -> text(ecode, ecode = _)) } along with: <lift:home.searchForm form="POST" multipart="true" > <table> <tr> <td>DocId</td> <td>VisitId</td> <td>Provider</td> <td>EanMCode</td> </tr> <tr> <td><work:docId /></td> <td><work:visitId /></td> <td><work:provider /></td> <td><work:emCode /></td> <td><button>Click Me!</button></td> </tr> </table> </lift:home.searchForm> Inside an html page. I have included xmlns:lift="http://liftweb.net/" in default.... I can't find anyway to fix this... I am getting XML Parsing Error: prefix not bound to a namespace Location: http://localhost:8080/ Line Number 29, Column 10: <td><work:docId></work:docId></td> in firefox. I have written similar code and had it working in another app and just cant even find anything im doing different thats not trivial naming... Thanks in advance!

    Read the article

  • Directly call distutils' or setuptools' setup() function with command name/options, without parsing

    - by Ryan B. Lynch
    I'd like to call Python's distutils' or setuptools' setup() function in a slightly unconventional way, but I'm not sure whether distutils is meant for this kind of usage. As an example, let's say I currently have a 'setup.py' file, which looks like this (lifted verbatim from the distutils docs--the setuptools usage is almost identical): from distutils.core import setup setup(name='Distutils', version='1.0', description='Python Distribution Utilities', author='Greg Ward', author_email='[email protected]', url='http://www.python.org/sigs/distutils-sig/', packages=['distutils', 'distutils.command'], ) Normally, to build just the .spec file for an RPM of this module, I could run python setup.py bdist_rpm --spec-only, which parses the command line and calls the 'bdist_rpm' code to handle the RPM-specific stuff. The .spec file ends up in './dist'. How can I change my setup() invocation so that it runs the 'bdist_rpm' command with the '--spec-only' option, WITHOUT parsing command-line parameters? Can I pass the command name and options as parameters to setup()? Or can I manually construct a command line, and pass that as a parameter, instead? NOTE: I already know that I could call the script in a separate process, with an actual command line, using os.system() or the subprocess module or something similar. I'm trying to avoid using any kind of external command invocations. I'm looking specifically for a solution that runs setup() in the current interpreter. For background, I'm converting some release-management shell scripts into a single Python program. One of the tasks is running 'setup.py' to generate a .spec file for further pre-release testing. Running 'setup.py' as an external command, with its own command line options, seems like an awkward method, and it complicates the rest of the program. I feel like there may be a more Pythonic way.

    Read the article

  • Parsing JSON to XML using net.sf.json (java)

    - by Castanho
    Hi guys, I'm parsing a generic JSON to a XML using net.sf.json. (I'm not using POJO Obj in the conversion) When dealing with vectors I'm receiving: <root> <entry> <Id>1</accountId> <Items> <e> <cost>0.1</cost> <debit>0.1</debit> </e> <e> <cost>0.1</cost> <debit>0.1</debit> </e> </Items> </entry> </root> When the correct for my point of view should be: <root> <entry> <accountId>1</accountId> <Items> <cost>0.1</cost> <debit>0.1</debit> </Items> <Items> <cost>0.2</cost> <debit>0.2</debit> </Items> </entry> </root> Do anyone have used this lib and could help me? Any tips could help! Thanks in advance

    Read the article

  • Intercepting Xstream conversion while parsing XML

    - by Shane Bell
    Suppose I have a simple Java class like this: public class User { String firstName; String lastName; public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } } Now, suppose I want to parse the following XML: <user> <firstName>Homer</firstName> <lastName>Simpson</lastName> </user> I can do this with no problems in XStream like so: User homer = (User) xstream.fromXML(xml); Ok, all good so far, but here's my problem. Suppose I have the following XML that I want to parse: <user> <fullName>Homer Simpson</fullName> </user> How can I convert this XML into the same User object using XStream? I'd like a way to implement some kind of callback so that when XStream parses the fullName field, I can split the string in two and manually set the first name and last name fields on the user object. Is this possible? Note that I'm not asking how to split the string in two (that's the easy part), I want to know how to intercept the XML parsing so XStream doesn't try to reflectively set the fullName field on the User object (which obviously doesn't exist). I looked at the converters that XStream provides but couldn't figure out how to use it for this purpose. Any help would be appreciated.

    Read the article

  • C++ Declarative Parsing Serialization

    - by Martin York
    Looking at Java and C# they manage to do some wicked processing based on special languaged based anotation (forgive me if that is the incorrect name). In C++ we have two problems with this: 1) There is no way to annotate a class with type information that is accessable at runtime. 2) Parsing the source to generate stuff is way to complex. But I was thinking that this could be done with some template meta-programming to achieve the same basic affect as anotations (still just thinking about it). Like char_traits that are specialised for the different types an xml_traits template could be used in a declaritive way. This traits class could be used to define how a class is serialised/deserialized by specializing the traits for the class you are trying to serialize. Example Thoughs: template<typename T> struct XML_traits { typedef XML_Empty Children; }; template<> struct XML_traits<Car> { typedef boost::mpl::vector<Body,Wheels,Engine> Children; }; template<typename T> std::ostream& Serialize(T const&) { // my template foo is not that strong. // but somthing like this. boost::mpl::for_each<typename XML_Traits<T>::Children,Serialize>(data); } template<> std::ostream& Serialize<XML_Empty>(T const&) { /* Do Nothing */ } My question is: Has anybody seen any projects/decumentation (not just XML) out there that uses techniques like this (template meta-programming) to emulate the concept of annotation used in languges like Java and C# that can then be used in code generation (to effectively automate the task by using a declaritive style). At this point in my research I am looking for more reading material and examples.

    Read the article

  • Syntax Error? When parsing XML value

    - by Ace Munim
    I don't know if I'm having a syntax error but the compiler is giving me TypeError: 'undefined' is not an object (evaluating 'xmlDoc.getElementsByTagName("icon")[i].childNodes') Its me giving me this problem when im parsing the XML from my server, my actual javascript code is like this var xmlDoc = Obj.responseXML; var count = 0; if(xmlDoc){ while(count <= xmlDoc.getElementsByTagName("item").length){ document.getElementById("flow").innerHTML += "<div class='item'><img class='content' src='" + xmlDoc.getElementsByTagName("icon")[i].childNodes[0].nodeValue.replace(/\s+$/g,' ') +"' /></div>"; count++; } }else{ alert("Unable to parse!"); } and my XML goes like this. <feed> <item> <title>Given Title</title> <icon> http://i178.photobucket.com/albums/w255/ace003_album/Logo-ETC-RGB-e1353503652739.jpg </icon> </item> <item>...</item> <item>...</item> <item>...</item> <item>...</item> <item>...</item> <item>...</item> </feed> i just want to parse the image link and to show it.

    Read the article

  • Parsing URL error

    - by user577875
    It didn't seem like there was a post about this, so here goes. I've been working on a simple app to grab my time table from my school, and get it on my phone. Currently I'm working on the port on android but I've hit an issue. I get the error: java.io.IOException: -1 error loading URL urladress. Code: public void updateTimeTable(){ //Get UID and Birthday SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); String uid = prefs.getString("uid", "000000"); String fods = prefs.getString("fodsdag", "000000"); //Set URL String url = "http://unv1.aalborg-stu.dk/cgi-bin/elevskema.pl?ugen=0&unavn=" + uid + "&fodsdag=" + fods; try { Document doc = Jsoup.connect(url).get(); Elements td = doc.getElementsByTag("td"); //ArrayList<String> tdArray = new ArrayList<String>(); // for (Element tds : td) { // String tdText = tds.text(); // tdArray.add(tdText); //} //String[] data = tdArray.toArray(new String[tdArray.size()]); } catch (IOException e ){ Log.e("Parser", "shite", e); } Context context = getApplicationContext(); CharSequence text = url; int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, text, duration); toast.show(); } I've commented some lines out to identify where the issue is, and it seems it's at the actual parsing. Anywho, screenshot of the error I get: Screenshot I got about 4 days worth of Java experience so forgive me if it's something silly. Best Regards

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >