Parser Error Attribute Xmlns Redefined
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up xml parse error attribute name redefined up vote 0 down vote favorite In my portscanner program, i wish to successfully write the output of the port number, scanned by and the service name. so for each port number, scannedby and service name, i invoke the parseall routine below. void parseall(int pid, char *scannedby, char *service){ // routine to add port, scannedby and service to xmlfile xmlDocPtr doc; // pointer to parse xml Document xmlNodePtr cur = NULL;// node pointer. It interacts with individual node xmlAttrPtr attr; char portid[10]; sprintf (portid,"%d",pid); // converted int to string doc = xmlParseFile(xmlFileName); //parse filename cur = xmlDocGetRootElement(doc); // get rootnode addnewportinfotag(cur,doc); // this routine adds new portid, scannedby and servicename tags to the xmlfile created cur = cur->xmlChildrenNode; //get pointer parseport(doc, cur, portid); // routine to add port to xmlfile while(cur!=NULL){ if ((!xmlStrcmp(cur->name, (const xmlChar *)"ports"))){ parsehost(doc, cur, scannedby); // routine to add scanned by to xmlfile parseservice(doc, cur, service); //routine to add servicename to xmlfile } cur = cur->next; } xmlSaveFormatFile (xmlFileName, doc, 1); return; xmlFreeDoc(doc); } the code compiles successfully but when i scan for more than one port, it gives an "xml parse error attribute name redefined" as below: [ Port ] [ Scanned by] [ Status ] [Service] 79/tcp osus Open finger 80/tcp bt Open www 111/tcp osus Open sunrpc xmloutput.xml:5: parser error : Attribute portid redefined
GoogleВойтиСкрытые поляПоиск групп или сообщений
Sign in Pricing Blog Support Search GitHub This repository Watch 50 Star 890 Fork 211 canvg/canvg Code Issues 131 Pull requests 19 Projects 0 https://github.com/canvg/canvg/issues/189 Pulse Graphs New issue IE (10 ?) syntax errors when using declarations #189 Open gabelerner opened this Issue Dec 7, 2014 · 10 comments Projects None yet Labels bug imported Milestone No milestone Assignees No one assigned 2 participants canvg member gabelerner commented Dec 7, 2014 From baptiste...@gomoob.com on December 04, 2012 14:41:57 Hi, I'm parser error trying to output a RaphaelJS SVG element to a base64 image but i've encountered a problem while executing my code under IE (I'm using IE10 but I've tested this in IE9 and IE8 compatibility modes). I think my problem comes from the line '137' in 'canvg.js', that's to say on the 'parser.parseFromString(xml, 'text/xml')' instruction. My SVG code is the following parser error attribute : Created with Raphaël 2.1.0 You can replace the images by whatever you want. When I execute canvg on this string IE outputs the following errors : SCRIPT5022: SyntaxError canvg.js, Ligne 131 Caractère 5 XML5634: Un attribut avec le même nom existe déjà sur cet élément. , Ligne 1 Caractère 161 This seems to be a parsing error, if I add the following lines at the beginning of the 'svg.parseXml' function my code now works. // -- Internet Explorer trick, otherwise an error is generated in the 'parseFromString' function when // -- You use declarations, this is the case for Raphael xml = xml.replace(/xmlns=\"http:\/\/www.w3.org\/2000\/svg\"/, ''); Hope this can help... Baptiste Original issue: http://code.google.com/p/canvg/issues/detail?id=189 canvg member gabelerner commented Dec 7, 2014 From jose.val...@gmail.com on June 04, 2013 16:57:10 That worked great.. thanks canvg member gabelerner commented Dec 7, 2014 From vtdatase...@gmail.com on June 12, 2013 15:02:45 Thank you this worked. I added it on the line before "parser.parseFromString(xml, 'text/xml')" gabelerner added bug imported Priority-Medium labels Dec 7, 2014 canvg member gabelerner commented Dec 7, 2014 From adi...@anaustralian.com on Oc
Fehler werden angezeigt: Line 2, Column 49: duplicate specification of attribute "xmlns". "http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns="ht ✉ You have specified an attribute more than once. Example: Using the "height" attribute twice on the same "img" tag. Line 2, Column 86: duplicate specification of attribute "xmlns". "http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns="ht ✉ You have specified an attribute more than once. Example: Using the "height" attribute twice on the same "img" tag. Line 2, Column 123: duplicate specification of attribute "xmlns". "http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns="ht ✉ You have specified an attribute more than once. Example: Using the "height" attribute twice on the same "img" tag. Line 2, Column 160: duplicate specification of attribute "xmlns". "http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns="ht ✉ You have specified an attribute more than once. Example: Using the "height" attribute twice on the same "img" tag. Line 2, Column 197: duplicate specification of attribute "xmlns". "http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns="ht ✉ You have specified an attribute more than once. Example: Using the "height" attribute twice on the same "img" tag. Line 2, Column 234: duplicate specification of attribute "xmlns". "http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns="ht ✉ You have specified an attribute more than once. Example: Using the "height" attribute twice on the same "img" tag. Line 2, Column 271: duplicate specification of attribute "xmlns". "http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns="ht ✉ You have specified an attribute more than once. Example: Using the "height" attribute twice on the same "img" tag. Line 2, Column 308: duplicate specification of attribute "xmlns". "http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns="ht ✉ You have specified an attribute more than once. Example: Using the "height" attribute twice on the same "img" tag. Line 2, Column 345: duplicate specification of attribute "xmlns". "http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns="ht ✉ You have specified an attribute more than once. Example: Using the "height" attribute twice on the same "img" tag. Line 2, Column 382: duplicate specification of attribute "xmlns". "http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtm