Search Results

Search found 1813 results on 73 pages for 'parser'.

Page 10/73 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • How to get elements from a page using Simple HTML DOM Parser

    - by sm56d
    Hi I am trying to parse a HTML page using the Simple HTML DOM Parser. This HTML page doesn't make use of IDs which makes it harder to refer to elements. On this page I am trying to get the Album name, Song title, download link and the album image. I have done this but I can't even get the Album names! $html = file_get_html('http://music.banadir24.com/singer/aasha_abdoo/247.html'); $article = $html->find('table td[class=title]', 0); foreach($article as $link){ echo $link; } This outputs: 1tdArrayArrayArray Artist Array I need to get this sort of output: Image Path Duniya Jamiila [URL] Macaan Badnoo [URL] Donimaayee [URL] ... Thanks all for any help Please note: This is legal as the songs are not bound by copyright and they are available to download freely, its just I need to download a lot of them and I can't sit there clicking a button all day. Having said that, its taken me an hour to get this far.

    Read the article

  • Get graphics information from font file. How to develop font parser similar to PDFView's font parser

    - by HBA
    Hi, I am trying to convert text into graphics using c#. My input is character string and output is bitmap with the input text. After lot of search I found some ways to do it, I found some techiques which uses this kind of techinque. For Example While creating Captcha, we have to print the character in the bitmap. But for that I should have the font installed in my windows. I can not perform such operation without installing the font. I have .ttf file with me but I dont want to install it because my work for that font is temporary only. Is there any way where I can extract out the Font's graphical information by providing the Character? I have also found font parser code http://swinglabs.java.sun.com/hudson/job/PDFRenderer%20Weekly%20Build/javadoc/com/sun/pdfview/font/package-summary.html Can anyone please provide me how to develpo similar thing using c#.Net? Or From where can I get the algorithm to parce font?

    Read the article

  • Light weight C++ SAX XML parser

    - by John Bartholomew
    I know of at least three light weight C++ XML parsers: RapidXML, TinyXML and PugiXML. However, all three use a DOM based interface (ie, they build their own in-memory representation of the XML document and then provide an interface to traverse and manipulate it). For most situations that I have to deal with, I much prefer the SAX interface (where the parser just spits out a stream of events like start-of-tag, and the application code is responsible for doing whatever it wants based on those events). Can anyone recommend a light weight C++ XML library with a SAX interface? Edit: I should also note the Microsoft XmlLite library, which does use a SAX interface. Unfortunately, it's ruled out for me at the moment since as far as I know it's closed source and Windows only (please correct me if I'm wrong on this).

    Read the article

  • Fast, lightweight XML parser

    - by joe90
    I have a specific format XML document that I will get pushed. This document will always be the same type so it's very strict. I need to parse this so that I can convert it into JSON (well, a slightly bastardized version so someone else can use it with DOJO). My question is, shall I use a very fast lightweight (no need for SAX, etc.) XML parser (any ideas?) or write my own, basically converting into a StringBuffer and spinning through the array? Basically, under the covers I assume all HTML parsers will spin thru the string (or memory buffer) and parse, producing output on the way through. Thanks //edit Thanks for the responses so far :) The xml will be between 3/4 lines to about 50 max (at the extreme)..

    Read the article

  • recommended parser for XML in java(absolute beginner to xml)

    - by poeschlorn
    Hi Pro's, which parser (java) would you recommend for parsing GPX data? Im looking for a one that is very intuitive to use and should not need too much RAM (it seems that DOM requires too much, doesn't it?). I have no idea about parsing xml, so it is time for me to learn this ;-) My documents are not very huge and are always read twice(a point for DOM), but I don't want to keep as few things as possible in RAM. What would you do in this situation? Which one would you coose and why?

    Read the article

  • Most Lite-Weight XML Parser with XPath and Wide-char Support

    - by Mystagogue
    I want a lite-weight C++ XML parser/DOM that: Can take UTF-8 as input, and parse into UTF-16. Maybe it does this directly (ideal!), or perhaps it provides a hook for the conversion (such as taking a custom stream object that does the conversion before parsing). Offers some XPath support. I've been looking at RapidXML, the Kranf xmlParser, and pugiXML. The first two of those might permit requirement #1 by way of a hook. The third, pugiXML, supports the #2 requirement. But none of those three fulfill both requirements. What is the smallest (free) library that can handle both requirements?

    Read the article

  • How to enable gzip compression using PHP Simple HTML DOM Parser

    - by brant
    I have tried a few things to enable gzip compression using PHP Simple HTML DOM Parser but nothing has seemed to work thus far. Using ini_set I've manged to change the user agent, so I figured it might be possible to also enable gzip compression? include("simpdom/simple_html_dom.php"); ini_set('zlib.output_compression', 'On'); $url = 'http://www.whatsmyip.org/http_compression/'; $html = file_get_html($url); print $html; The website above tests it. Please let me know if I am going about this the wrong way completely.

    Read the article

  • PERL XPath Parser Help

    - by cognvision
    I want to pull in data using a XML::XPath parser from a XML DB file from the Worldbank site. The problem is that I'm not seeing any results in the output. I must be missing something in the code. Ideally, I would like to extract just the death rate statistics from each country XML DB (year and value). I'm using this as part of my input: http://data.worldbank.org/sites/default/files/countries/en/afghanistan_en.xml use strict; use LWP 5.64; use HTML::ContentExtractor; use XML::XPath; my $agent1 = LWP::UserAgent->new; my $extractor = HTML::ContentExtractor->new(); #Retrieve main Worldbank country site my $mainlink = "http://data.worldbank.org/country/"; my $page = $agent1->get("$mainlink"); my $fulltext = $page->decoded_content(); #Match to just all available countries in Worldbank my $country = ""; my @countryList; if (@countryList = $fulltext =~ m/(http:\/\/data\.worldbank\.org\/country\/.*?")/gi){ foreach $country(@countryList){ #Remove " at the end of link $country=~s/\"//gi; print "\n" . $country; #Retrieve each country profile's XML DB file my $page = $agent1->get("$country"); my $fulltext = $page->decoded_content(); my $XML_DB = ""; my @countryXMLDBList; if (@countryXMLDBList = $fulltext =~ m/(http:\/\/data\.worldbank\.org\/sites\/default\/files\/countries\/en\/.*?\.xml)/gi){ foreach $XML_DB(@countryXMLDBList){ my $page = $agent1->get("$XML_DB"); my $fulltext = $page->decoded_content(); #print $fulltext; #Use XML XPath parser to find elements related to death rate my $xp = XML::XPath->new($fulltext); #my $xp = XML::XPath->new("afghanistan_en.xml"); my $nodeSet = $xp->find("//*"); if (!$nodeSet->isa('XML::XPath::NodeSet') || $nodeSet->size() == 0) { #No match found print "\nMatch not found!"; exit; } else { foreach my $node ($nodeSet->get_nodelist){ print "\n" . $node->find('country')->string_value; print "\n" . $node->find('indicator')->string_value; print "\n" . $node->find('year')->string_value; print "\n" . $node->find('value')->string_value; exit; } } } #Build line graph based on death rate statistics and output some image file format } } } I am also looking into using the xpath expression "following-sibling", but not sure how to use it correctly. For example, I have the following set of XML data where I am only interested in pulling siblings directly after the indicator for just death rate data. <data> <country id="AFG">Afghanistan</country> <indicator id="SP.DYN.CDRT.IN">Death rate, crude (per 1,000 people)</indicator> <year>2006</year> <value>20.3410000</value> </data> - <data> <country id="AFG">Afghanistan</country> <indicator id="SP.DYN.CDRT.IN">Death rate, crude (per 1,000 people)</indicator> <year>2007</year> <value>19.9480000</value> </data> - <data> <country id="AFG">Afghanistan</country> <indicator id="SP.DYN.CDRT.IN">Death rate, crude (per 1,000 people)</indicator> <year>2008</year> <value>19.5720000</value> </data> - <data> <country id="AFG">Afghanistan</country> <indicator id="IC.EXP.DOCS">Documents to export (number)</indicator> <year>2005</year> <value>7.0000000</value> </data> - <data> <country id="AFG">Afghanistan</country> <indicator id="IC.EXP.DOCS">Documents to export (number)</indicator> <year>2006</year> <value>12.0000000</value> </data> - <data> <country id="AFG">Afghanistan</country> <indicator id="IC.EXP.DOCS">Documents to export (number)</indicator> <year>2007</year> <value>12.0000000</value> </data> Any help would be much appreciated!!!

    Read the article

  • parser the xml and build a ui for user

    - by hguser
    Hi: Now I have to handle some xml in my java swing application. I have to build a swing ui according to the special schema ,then user can fill some values.After user completed,I will collect the information,validate the value and then build a xml file. For building xml file I can use the xmlbeans,however how to parse the schema and build a swing ui? Since the schema is rather complex. A schema can be found here: example schema I have to parser this schema,for the LiteralInputType ,a JTextArea should be built. However there are other types "complexType" and etc.. These types may not occur at the sametime. Some times only the LiteralInputType is needed,somethimes the ComplexType is needed,also maybe all of them are needed. So, how to implement it? Anyone can help me?

    Read the article

  • An MP3 parser to extract numbered frames?

    - by Xepoch
    I am writing a streaming application for MP3 (CBR). It is all passthru, meaning I don't have to decode/encode, I just need to pass on the data as I see it come through. I want to be able to count the MP3 frames as they passthru (and some other stuff like throughput calculations). According to the MP3 frame header spec, the sync word appears to be 11 bits of 1s, however I notice (naturally) that the frame payload which I should safely assume to be binary and thus it is not odd at all to see 11 1s in sequence. My questions: Is there a Unix/Linux MP3 parser utility (dd-style) that can pull numbered frames from an MP3 file/pipe? Any perl wisdom here? How does one delineate an MP3 header block from any other binary payload data? and lastly: Is a constant bitrate (CBR) MP3 defined by payload bytes or are the header bytes included in the aggregate # of bytes/bits per any given timeslice? Thanks,

    Read the article

  • Looking for a managed image parser library (JPEG, BMP, PNG, GIF)

    - by usr
    I am writing a discussion board software that will have "avatar" images for the users. I want to resize any picture that gets uploaded to a reasonable size. I could easily do that with System.Drawing but that is relying on GDI+ which has hat security problems before. The problem is that the images are untrusted. So I thought of using a fully managed lib to solve that problem because managed code cannot escape the sandbox (of course it can, but only if the code is user-supplied which it is not in my case). So does anybody know of a managed image parser library for JPEG, BMP, PNG and GIF? If some format is missing than I will have to live with that. Edit: Paint.NET also relies on GDI+. You might be interested in the discussion below, too.

    Read the article

  • Android XML Parser isnt working

    - by Bram
    I am writing an android application with a XML parser. I have a parser that used to work but when I run it it isnt doing anything. This is my class: import java.net.URL; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; import android.app.Activity; import android.os.Bundle; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; public class XMLParsingUsingDomeActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout layout = new LinearLayout(this); layout.setOrientation(1); TextView ID[]; TextView vraag[]; TextView category[]; TextView a1[]; TextView p1[]; TextView a2[]; TextView p2[]; TextView a3[]; TextView p3[]; try { URL url = new URL( "http://128.140.217.126/vragen.xml"); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder dbu= dbf.newDocumentBuilder(); Document doc = dbu.parse(new InputSource(url.openStream())); doc.getDocumentElement().normalize(); NodeList nodeList = doc.getElementsByTagName("item"); ID = new TextView[nodeList.getLength()]; vraag = new TextView[nodeList.getLength()]; category = new TextView[nodeList.getLength()]; a1 = new TextView[nodeList.getLength()]; p1 = new TextView[nodeList.getLength()]; a2 = new TextView[nodeList.getLength()]; p2 = new TextView[nodeList.getLength()]; a3 = new TextView[nodeList.getLength()]; p3 = new TextView[nodeList.getLength()]; for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); ID[i] = new TextView(this); vraag[i] = new TextView(this); category[i] = new TextView(this); a1[i] = new TextView(this); p1[i] = new TextView(this); a2[i] = new TextView(this); p2[i] = new TextView(this); a3[i] = new TextView(this); p3[i] = new TextView(this); Element fstElmnt = (Element) node; NodeList nameList = fstElmnt.getElementsByTagName("ID"); Element nameElement = (Element) nameList.item(0); nameList = nameElement.getChildNodes(); ID[i].setText(((Node) nameList.item(0)).getNodeValue()); NodeList vraagList = fstElmnt.getElementsByTagName("vraag"); Element vraagElement = (Element) vraagList.item(0); vraagList = vraagElement.getChildNodes(); vraag[i].setText(((Node) vraagList.item(0)).getNodeValue()); NodeList a1List = fstElmnt.getElementsByTagName("a1"); Element a1Element = (Element) a1List.item(0); a1List = a1Element.getChildNodes(); a1[i].setText(((Node) a1List.item(0)).getNodeValue()); NodeList p1List = fstElmnt.getElementsByTagName("p1"); Element p1Element = (Element) p1List.item(0); p1List = p1Element.getChildNodes(); p1[i].setText(((Node) p1List.item(0)).getNodeValue()); NodeList a2List = fstElmnt.getElementsByTagName("a2"); Element a2Element = (Element) a2List.item(0); a2List = a2Element.getChildNodes(); a2[i].setText(((Node) a2List.item(0)).getNodeValue()); NodeList p2List = fstElmnt.getElementsByTagName("p2"); Element p2Element = (Element) p2List.item(0); p2List = p2Element.getChildNodes(); p2[i].setText(((Node) p2List.item(0)).getNodeValue()); NodeList a3List = fstElmnt.getElementsByTagName("a3"); Element a3Element = (Element) a3List.item(0); a3List = a3Element.getChildNodes(); a3[i].setText(((Node) a3List.item(0)).getNodeValue()); NodeList p3List = fstElmnt.getElementsByTagName("p3"); Element p3Element = (Element) p3List.item(0); p3List = p3Element.getChildNodes(); p3[i].setText(((Node) p3List.item(0)).getNodeValue()); layout.addView(category[i]); Toast.makeText(this, "ID: " + i + "\n" + "Vraag: " + ((Node) vraagList.item(0)).getNodeValue() + "\n" + "A1: " + ((Node) a1List.item(0)).getNodeValue() + "\n" + "P2: " + ((Node) p1List.item(0)).getNodeValue() + "\n" + "A2: " + ((Node) a2List.item(0)).getNodeValue() + "\n" + "P2: " + ((Node) p2List.item(0)).getNodeValue() + "\n" + "A3: " + ((Node) a3List.item(0)).getNodeValue() + "\n" + "P3: " + ((Node) p3List.item(0)).getNodeValue(), Toast.LENGTH_LONG).show(); } } catch (Exception e) { System.out.println("XML Pasing Excpetion = " + e); } /** Set the layout view to display */ setContentView(layout); } } And my manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="your.pace.namace" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <uses-permission android:name="android.permission.INTERNET"></uses-permission> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".XMLParsingUsingDomeActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> And the logcat output is worthless. I didnt change the code but its just not working anymore.

    Read the article

  • Trouble parsing quotes with SAX parser (javax.xml.parsers.SAXParser) on Android API 1.5

    - by johnrock
    When using a SAX parser, parsing fails when there is a " in the node content. How can I resolve this? Do I need to convert all " characters? In other words, anytime I have a quote in a node: <node>characters in node containing "quotes"</node> That node gets butchered into multiple character arrays when the Handler is parsing it. Is this normal behaviour? Why should quotes cause such a problem? Here is the code I am using: import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; import org.xml.sax.InputSource; import org.xml.sax.XMLReader; ... HttpGet httpget = new HttpGet(GATEWAY_URL + "/"+ question.getId()); httpget.setHeader("User-Agent", PayloadService.userAgent); httpget.setHeader("Content-Type", "application/xml"); HttpResponse response = PayloadService.getHttpclient().execute(httpget); HttpEntity entity = response.getEntity(); if(entity != null) { SAXParserFactory spf = SAXParserFactory.newInstance(); SAXParser sp = spf.newSAXParser(); XMLReader xr = sp.getXMLReader(); ConvoHandler convoHandler = new ConvoHandler(); xr.setContentHandler(convoHandler); xr.parse(new InputSource(entity.getContent())); entity.consumeContent(); messageList = convoHandler.getMessageList(); }

    Read the article

  • Trouble parsing quotes with SAX parser (javax.xml.parsers.SAXParser)

    - by johnrock
    When using a SAX parser, parsing fails when there is a " in the node content. How can I resolve this? Do I need to convert all " characters? In other words, anytime I have a quote in a node: <node>characters in node containing "quotes"</node> That node gets butchered into multiple character arrays when the Handler is parsing it. Is this normal behaviour? Why should quotes cause such a problem? Here is the code I am using: import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpGet; import org.xml.sax.InputSource; import org.xml.sax.XMLReader; ... HttpGet httpget = new HttpGet(GATEWAY_URL + "/"+ question.getId()); httpget.setHeader("User-Agent", PayloadService.userAgent); httpget.setHeader("Content-Type", "application/xml"); HttpResponse response = PayloadService.getHttpclient().execute(httpget); HttpEntity entity = response.getEntity(); if(entity != null) { SAXParserFactory spf = SAXParserFactory.newInstance(); SAXParser sp = spf.newSAXParser(); XMLReader xr = sp.getXMLReader(); ConvoHandler convoHandler = new ConvoHandler(); xr.setContentHandler(convoHandler); xr.parse(new InputSource(entity.getContent())); entity.consumeContent(); messageList = convoHandler.getMessageList(); }

    Read the article

  • Text Parsing - My Parser Skipping commands

    - by The.Anti.9
    I'm trying to parse text-formatting. I want to mark inline code, much like SO does, with backticks (`). The rule is supposed to be that if you want to use a backtick inside of an inline code element, You should use double backticks around the inline code. like this: `` mark inline code with backticks ( ` ) `` My parser seems to skip over the double backticks completely for some reason. Heres the code for the function that does the inline code parsing: private string ParseInlineCode(string input) { for (int i = 0; i < input.Length; i++) { if (input[i] == '`' && input[i - 1] != '\\') { if (input[i + 1] == '`') { string str = ReadToCharacter('`', i + 2, input); while (input[i + str.Length + 2] != '`') { str += ReadToCharacter('`', i + str.Length + 3, input); } string tbr = "``" + str + "``"; str = str.Replace("&", "&amp;"); str = str.Replace("<", "&lt;"); str = str.Replace(">", "&gt;"); input = input.Replace(tbr, "<code>" + str + "</code>"); i += str.Length + 13; } else { string str = ReadToCharacter('`', i + 1, input); input = input.Replace("`" + str + "`", "<code>" + str + "</code>"); i += str.Length + 13; } } } return input; } If I use single backticks around something, it wraps it in the <code> tags correctly.

    Read the article

  • PHP - complete url parser help

    - by Mark
    I have been trying to find an effective url parser, php's own does not include subdomain or extension. On php.net a number of users had contributed and made this: function parseUrl($url) { $r = "^(?:(?P<scheme>\w+)://)?"; $r .= "(?:(?P<login>\w+):(?P<pass>\w+)@)?"; $r .= "(?P<host>(?:(?P<subdomain>[-\w\.]+)\.)?" . "(?P<domain>[-\w]+\.(?P<extension>\w+)))"; $r .= "(?::(?P<port>\d+))?"; $r .= "(?P<path>[\w/]*/(?P<file>\w+(?:\.\w+)?)?)?"; $r .= "(?:\?(?P<arg>[\w=&]+))?"; $r .= "(?:#(?P<anchor>\w+))?"; $r = "!$r!"; // Delimiters preg_match ( $r, $url, $out ); return $out; } Unfortunately it fails on paths with a '-' and I can't for the life of me workout how to amend it to accept '-' in the path name. Thanks

    Read the article

  • parsing multiple child with sax parser in Android

    - by Ahmad Naqibul Arefin
    I can parse xml file with sax parser, but when I need to add child attribute under a attribute then how I can get the value? my xml file is here: <?xml version="1.0" encoding="UTF-8"?> <marketlist> <market> <name restricted="yes">boss</name> <motorway>M6</motorway> <junction>J3</junction> <petrol_hour> <mon>7am - 8pm</mon> <tues>7am - 8pm</tues> </petrol_hour> </market> I want to parse and get mon and tues values. Any suggesstion? My android code for parsing is here: public void endElement(String uri, String localName, String qName) throws SAXException { elementOn = false; /** * Sets the values after retrieving the values from the XML tags * */ if (localName.equalsIgnoreCase("name")) data.setMarketName(elementValue); else if (localName.equalsIgnoreCase("motorway")) data.setMotorway(elementValue); else if (localName.equalsIgnoreCase("junction")) data.setJunction(elementValue);

    Read the article

  • Retrieving the first picture with a HTML parser

    - by justin01
    Hey guys, (Not a native english speaker) I'm doing a personal project in PHP in which I use the Simple HTML Parser to parse the HTML of a given URL and retrieve the first image in a DIV that have a specific ID or class (maincontent, content, main, wrapper, etc. - it's all in an array) and ignore ads. The goal is to take this image and make a thumbnail with it, pretty much like on Digg and others. I thought everything was working fine until I tried my script with the website Snopes ("http://www.snopes.com/photos/animals/luckycoyote.asp" <- this page more exactly). The source of the first image it gets is: " graphics/luckycoyote1.jpg ". So far, to correct this problem I created a little function that gets the domain name of the given URL and insert it before the IMG's source attribute. So for sites like Snopes.com, it gives me: "http://www.snopes.com/graphics/luckycoyote1.jpg" ... while the real URL for this image is "http://www.snopes.com*/photos/animals/graphics/luckycoyote1.jpg*" (or, more precisely: " http://graphics1.snopes.com/photos/animals/graphics/luckycoyote1.jpg " - note the subdomain here). So my main question is: how can I externally/dynamically retrieve the full URL address of an image ("absolute path") when I am only given the "relative path"? I'm pretty sure this is possible, since when I paste the link in Facebook's "What are you doing?" field for example, it gives me the correct path to the image while on the website, the source of the image is only (example) "image/photo/example.jpg". Thank you for your time.

    Read the article

  • A generic Re-usable C# Property Parser utility

    - by Shyam K Pananghat
    This is about a utility i have happened to write which can parse through the properties of a data contracts at runtime using reflection. The input required is a look like XPath string. since this is using reflection, you dont have to add the reference to any of your data contracts thus making pure generic and re- usable.. you can read about this and get the full c# sourcecode here. Property-Parser-A-C-utility-to-retrieve-values-from-any-Net-Data-contracts-at-runtime Now about the doubts which i have about this utility. i am using this utility enormously i many places of my code I am using Regex repetedly inside a recursion method. does this affect the memmory usage or GC collection badly ?do i have to dispose this manually. if yes how ?. The statements like obj.GetType().GetProperty() and obj.GetType().GetField() returns .net "object" which makes difficult or imposible to introduce generics here. Does this cause to have any overheads like boxing ? on an overall, please suggest to make this utility performance efficient and more light weight on memmory

    Read the article

  • 'whatever' has no declared type

    - by mihirpmehta
    i am developing parser using bison...in my grammar i am getting this error Here is a code extern NodePtr CreateNode(NodeType, ...); extern NodePtr ReplaceNode(NodeType, NodePtr); extern NodePtr MergeSubTrees(NodeType, ...); ................... NodePtr rootNodePtr = NULL; /* pointer to the root of the parse tree */ NodePtr nodePtr = NULL; /* pointer to an error node */ ........................... NodePtr mainMethodDecNodePtr = NULL; ................ /* YYSTYPE */ %union { NodePtr nodePtr; } i am getting this error whenever i use like $$.nodePtr or $1.nodePtr ... I am getting Parser.y:1302.32-33: $1 of `Expressi on' has no declared type

    Read the article

  • xml validity with xsd with xsi:nillable element

    - by Laxmikanth Samudrala
    My XML file <tns:SampleInfoResponse xsi:schemaLocation="sampleNS test.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="sampleNS"> String String String String String String String String String String String String MY XSD file <xsd:schema targetNamespace="sampleNS" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="sampleNS" xmlns="http://www.w3.org/2001/XMLSchema"> parser is complaining on <tns:LSampleEnrlDetails/>, the XML file should be <tns:LSampleEnrlDetails xsi:nil="true"/> only for valid file ? By taking out the whole tag also the parser is complaining. I would like to know what possible cases for this tag makes the XML file valid according the above schema when i don't have the data to populate for tag

    Read the article

  • Why does dojo parsing time depend on css and images availability?

    - by Kniganapolke
    I have been profiling javascript on my page that uses dojo widgets. I don't use explicit parsing - the parser runs on page load. What I noticed is that if I clear browser cache before refreshing the page, dojo parsing takes much more time than if all the files are already cached. Note that we build all the required dojo modules into a layer (a single file), so we don't lazy-load any js files. I wonder if dojo parsing process depends on images and css resources, as far as I know it only instantiates widgets and injects dom nodes. Do you have any ideas why dojo parser runs longer (2-3 times longer in my case) when the cache is cleared?

    Read the article

  • Firefox DOMParser problem

    - by Michael
    For some reason DOMParser is adding some additional #text elements for each newline \n for this url http://rt.com/Root.rss ...as well as many other RSS I've tried. I checked cnn/bbc feeds, they don't have newlines and dom parser handling them nicely. So I have to add the following before parsing it var xmlText = htmlText.replace(/\n[ ]*/g, ""); var xmlDoc = parser.parseFromString(xmlText, "text/xml"); Server is returning text/xml. var channel = xmlDoc.documentElement.childNodes[0]; this returning \n without my code above and channel with correction.

    Read the article

  • problem with Using SAX parser

    - by moustafa
    Hi guys i have this small class task that im having trouble with. I need to create a PHP file using SAX to generate the display shown below from an XML file. Im not sure how to Use | to represent its level, where the root element orders is at level zero. This is what the result should look like when i parse it through a SAX parser http://img13.imageshack.us/img13/6950/75914446.jpg This is the XML source code from which i need to generate the display: <orders> <order> <count>37</count> <price>49.99</price> <book> <isbn>0130897930</isbn> <title>Core Web Programming Second Edition</title> <authors> <count>2</count> <author>Marty Hall</author> <author>Larry Brown</author> </authors> </book> </order> <order> <count>1</count> <price>9.95</price> <yacht> <manufacturer>Luxury Yachts, Inc.</manufacturer> <model>M-1</model> <standardFeatures oars="plastic" lifeVests="none">false</standardFeatures> </yacht> </order> <order> <count>3</count> <price>22.22</price> <book> <isbn>B000059Z4H</isbn> <title>Harry Potter and the Order of the Phoenix</title> <authors> <count>1</count> <author>J.K. Rowling</author> </authors> </book> </order>

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >