search for: xmlparse

Displaying 20 results from an estimated 26 matches for "xmlparse".

Did you mean: xmlparser
2011 Feb 13
1
RCytoscape setPosition error
...9;, 'E', 'F') nodesAll = union(nodesFr, nodesTo) nElemFr = length(nodesFr) nElemTo = length(nodesTo) g <- graph::addNode(nodesAll, g) setPosition(cw, nodesFr , c(400, 400, 400), c(100, 200, 300)) setPosition(cw, nodesTo , c(600, 600, 600), c(100, 200, 300)) Error in convertToR(xmlParse(node, asText = TRUE)) : faultCode: 0 faultString: Failed to invoke method setNodesPositions in class tudelft.CytoscapeRPC.CytoscapeRPCCallHandler: null setPosition(cw, nodesTo , c(600, 600, 600), c(100, 200, 300)) Error in convertToR(xmlParse(node, asText = TRUE)) : faultCode: 1001 faultString...
2011 Oct 10
1
Text Mining with Facebook Reviews (XML and FQL)
...haracter(0) Qword <- URLencode('#IBM') QUERY <- paste('SELECT review_id, message, rating from review where message LIKE %',Qword,'%',sep='') Facebook_url = paste('https://api.facebook.com/method/fql.query?query= ',QUERY,sep='') mydata.xml <- xmlParseDoc(Facebook_url, asText=F) mydata.vector <- xpathSApply(mydata.xml, '//s:entry/s:title', xmlValue, namespaces =c('s'='http://www.w3.org/2005/Atom')) The mydata.xml is NULL therefore no further step can be execute. I am not so familiar with XML or FQL. Any suggestion will...
2006 Mar 23
4
XML parser fixed
Hi, I changed the XML parser who have been write by Greg (Gregory Hill) and changed some things. It did not work in IE and Safari and opera. I fixed some bugs. Now it works fine in IE, Safari, Firefox and Opera. /* --------------------------------------- */ XMLParser = Class.create(); Object.extend(XMLParser.prototype, { initialize: function (XMLFile, options) { this.xmlFile = XMLFile; this.options = options; this.element = false; this.XMLParsed = false; this.getXml(); }, XMLHash: function () {...
2010 Aug 30
4
getNodeSet - what am I doing wrong?
Hi, Why is the following retuning a nodset of length 0: > library(XML) > test <- xmlTreeParse( > "http://www.unimod.org/xml/unimod_tables.xml",useInternalNodes=TRUE) > getNodeSet(test,"//modifications_row") Thanks for any hint. Joh
2013 Jan 29
2
converting XML document to table or dataframe
...vativeTable$nonDerivativeTransaction$transactionAmounts$transactionPricePerShare$value_1 $nonDerivativeTable$nonDerivativeTransaction$transactionAmounts$transactionPricePerShare$value_2 $nonDerivativeTable$nonDerivativeTransaction$transactionAmounts$transactionPricePerShare$value_3 etc myxml = xmlParse(" http://www.sec.gov/Archives/edgar/data/743988/000124636013000561/form.xml") mylist <- xmlToList(mydoc) mydf <- xmlToDataFrame(mydoc) mydf2 <- data.frame(mylist) mytable <- as.table(mylist) mydf2 <- data.frame(mydoc) mytable <- as.table(mydoc) [[alternative HTML versi...
2011 Apr 06
1
Treatment of xml-stylesheet processing instructions in XML module
Hello again, Another stumble here that is defeating me. I try: a<-readLines(url("http://feeds.feedburner.com/grokin")) t<-XML::xmlTreeParse(a, ignoreBlanks=TRUE, replaceEntities=FALSE, asText=TRUE) elem<- XML::getNodeSet(XML::xmlRoot(t),"/rss/channel/item")[[1]] And I get: Start tag expected, '<' not found Error: 1: Start tag expected, '<' not
2011 Dec 06
1
Memory getting eaten up with XML
...ata, then remove the document etc, it doesn't free up the memory. When I monitor it in windows task manager the memory usage just climbs with each iteration until R crashes. I can replicate the problem with the small example: file.name<-"C:\\MyData.xml.gz" TEMPP<-xmlParse(file.name) xx <- xmlRoot(TEMPP) rm(xx) rm(TEMPP) gc() Even though I remove the root node xx and the document TEMPP, the memory usage remains the same as it was when I first read it in... Any ideas/solutions? I am using a 32bit version of R 2.14.0 on windows XP, a...
2014 Dec 15
3
Significant memory leak when using XML on Windows
.... If you prefer plain vanilla, though, I guess this would be it: memoryLeak <- function( x = system.file("exampleData", "mtcars.xml", package="XML"), n = 5000, free_doc = FALSE, rm_doc = FALSE, use_gc = FALSE ) { lapply(1:n, function(ii) { doc <- xmlParse(x) if (free_doc) free(doc) if (rm_doc) rm(doc) if (use_gc) gc() NULL }) } 2) If I knew my way around OSX or Linux, I would be happy to go with your suggestions - but as I'm not, unfortunately that's out of reach for me. But IMO, a deeper level of cross-platform expertise...
2009 May 20
2
Example for parsing XML file?
Hi, I am trying to parse XML files and read them into R as a data frame, but have been unable to find examples which I could apply successfully. I'm afraid I don't know much about XML, which makes this all the more difficult. If someone could point me in the right direction to a resource (preferably with an example or two), it would be greatly appreciated. Here is a snippet from one of
2012 Nov 16
1
xmlParseDoc parser errors
Hi, I have some XML files that have a processing instruction directly after the XML declaration when I do kgroup.reading <- character(0) for (file in file_list){kgroup.reading <- xmlParseDoc(file.path("c:","projects","respositories","dk","004",file))} I get the error file name :1: parser error : Start tag expected, '<' not found When I remove the processing instruction and try to load it again I do not get the parser err...
2009 Oct 08
3
odfWeave & XML error in post-processing
......this is the tail of entirely uneventful processing of input file..... 31 : term xml(label=LR_Fall_Model_Results) 32 : term verbatim(label=LR_Model_Fall_graph) 33 : term xml(label=LR_OMC_tab) 'content_1.xml' has been Sweaved Removing content.xml Post-processing the contents xmlParseStartTag: invalid element name Entity 'apos' not defined Entity 'apos' not defined This triplet of errors XMLParse, and duplicate "Entity" lines is reported several times, then XML or odfWeave packs up its toys, and goes home without an output file. I'd (desperate...
2006 Mar 17
6
Updated the xml code to be more object-oriented
I changed the code to be more prototype-esque, and created a class called XMLDoc. I may add more functionality to it later, hence the more generic name, but you do something like this to convert XML to a hash: XMLDoc = Class.create(); Object.extend(XMLDoc.prototype, { initialize: function (xmlDoc) { this.element = xmlDoc; }, asHash: function () { if (! this._xmlHash) {
2012 May 15
1
KEGGSOAP installation error
...idate), as.logical(getDTD), as.logical(isURL), as.logical(addAttributeNamespaces), as.logical(useInternalNodes), FALSE, as.logical(isSchema), as.logical(fullNamespaceInfo), as.character(encoding), as.logical(useDotNames), xinclude, error, addFinalizer, PACKAGE = "XML") 2: xmlParse(url) 3: parseSchemaDoc(fileName) 4: processWSDL("http://soap.genome.jp/KEGG.wsdl") 5: fun(libname, pkgname) 6: doTryCatch(return(expr), name, parentenv, handler) 7: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8: tryCatchList(expr, classes, parentenv, handlers) 9: tryCatch(f...
2010 Sep 08
1
XML getNodeSet syntax for PUBMED XML export
I am looking for the syntax to capture XML tags marked with /DescriptorName MajorTopicYN="Y"/ , but the combination of the internal space (between "Name" and "Major" and the embedded quote marks are defeating me. I can get all the "DescriptorName" tags, but these include both MajroTopicYN = "Y" and "N" variants. Any suggestions?
2012 Apr 12
3
Remove superscripts from HTML objects
Is there some way to remove superscripts from objects returned by html/xmlParse (XML package)? h <- "<html><p>Cat<sup>a</sup></p><p>Dog</p></html>" doc <- htmlParse(h) xpathSApply(doc, "//p", xmlValue) [1] "Cata" "Dog" I could probably remove the <sup> tags from the "h&...
2012 May 17
1
using XML package to read RSS
Hi, I'm trying to use the XML package to read an RSS feed. To get started, I was trying to use this post as an example: http://www.r-bloggers.com/how-to-build-a-dataset-in-r-using-an-rss-feed-or-web-page/ I can replicate the beginning section of the post, but when I try to use another RSS feed I have an issue. The RSS feed I would like to use is: > URL <-
2011 Dec 23
2
Custom XML Readers
I need to construct a custom XML reader, the files I'm working with are in funky XML format: <str name="author">Paul H</str> <str name="country">USA</str> <date name="created_date">2010-02-16</date> I want to read the file so it looks like: author = Paul H country = USA created_date=2010-02-16 Does any one know how to
2010 Aug 24
2
Parsing a XML file
...uot;, node, PACKAGE = "XML") 2: xmlDoc("Malaria_Grave.xml") Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace Or I try this: doc <- xmlTreeParse("Malaria_Grave.xml") I get this xmlParseEntityRef: no name xmlParseEntityRef: no name Error: 1: xmlParseEntityRef: no name 2: xmlParseEntityRef: no name Please guys help this simple mortal! Caveman [[alternative HTML version deleted]]
2014 Dec 15
0
Significant memory leak when using XML on Windows
...is would be it: > > memoryLeak <- function( > x = system.file("exampleData", "mtcars.xml", package="XML"), > n = 5000, > free_doc = FALSE, > rm_doc = FALSE, > use_gc = FALSE > ) { > lapply(1:n, function(ii) { > doc <- xmlParse(x) > if (free_doc) free(doc) > if (rm_doc) rm(doc) > if (use_gc) gc() > NULL > }) > } > > 2) If I knew my way around OSX or Linux, I would be happy to go with your > suggestions - but as I'm not, unfortunately that's out of reach for me. But >...
2013 Apr 05
2
Text Encoding
Dear R-Help, I am using the RDF package/ R 2.14 with the RDF package to download data from a website, and then use R to manipulate it. Text on the website is UTF-8. The RDF package's rdf_load command is converting it into a different encoding, which converts non-ASCII characters to unicode codes. On the webpage/sparql RDF: "4.5µg of cDNA was used" In R, the RDF triple gives: