search for: xmlattr

Displaying 14 results from an estimated 14 matches for "xmlattr".

Did you mean: xmlattrs
2017 Oct 26
0
Error in UseMethod("xmlAttrs", node) : no applicable method for 'xmlAttrs' applied to an object of class "NULL"
I'm running R 3.4.1 on Linux. I'm getting the following error message. Error in UseMethod("xmlAttrs", node) : no applicable method for 'xmlAttrs' applied to an object of class "NULL" Calls: rdKMeans -> rdLoadModel -> xmlAttrs This appears to be a known issue in R Linux that was supposed to be patched. Is this really fixed? Was it fixed in 3.4.2? https://github.com...
2005 May 27
1
xmlAttrs and problems with reading node attributes of XML file (b ug?)
...; xsi:schemaLocation=\"c\">\n", "<parentFile a=\"a\" b=\"b\" />\n", "</mzXML>\n") cat(xmlFile) a = function(x,...){ cat("Attributes of ", xmlName(x), ": "); print(xmlAttrs(x)); cat("\n"); NULL } xmlTreeParse(file=xmlFile, asText=TRUE, handlers=list("startElement"=a) ) And its output: <?xml version="1.0" encoding="ISO-8859-1"?> <mzXML xmlns="a" xmlns:xsi="b" xsi:schemaLoca...
2012 Aug 10
3
Parsing large XML documents in R - how to optimize the speed?
...tDTD=FALSE, useInternalNodes=TRUE) result <- new('S4_result_class') result@proteins <- xpathApply(xml.doc, "//model/protein", function(protein.node) { protein <- new('S4_protein_class') ## fill in a couple of attributes of the protein object using xmlValue and xmlAttrs(protein.node) protein@peptides <- xpathApply(protein.node, "./peptide", function(peptide.node) { peptide <- new('S4_peptide_class') ## fill in a couple of attributes of the peptide object using xmlValue and xmlAttrs(peptide.node) peptide@aas <- sapply(xmlEl...
2006 Aug 01
1
xmlattr use .net web service from ruby problem
...ribute = {XSD::QName.new(nil, "Name") => "SOAP::SOAPString"} @@schema_element = [["value", [nil, XSD::QName.new("http://home.setup.org/absParam.xsd", "Value")]]] def Value @value end def Value=(value) @value = value end def xmlattr_Name (@__xmlattr ||= {})[XSD::QName.new(nil, "Name")] end def xmlattr_Name=(value) (@__xmlattr ||= {})[XSD::QName.new(nil, "Name")] = value end def initialize(value = nil) @value = value @__xmlattr = {} end end ***************************************...
2013 Jan 22
2
Creating a Data Frame from an XML
Hello, I'm attempting to read information from an XML into a data frame in R using the "XML" package. I am unable to get the data into a data frame as I would like. I have some sample code below. *XML Code:* Header... Data I want in a data frame: <data> <row BRAND="GMC" NUM="1" YEAR="1999" VALUE="10000" /> <row
2009 Jan 23
1
XML package help
...attribute for eName=='0ne' for all <File> nodes that have <FileTypeId>==10. I try the following, amoung several things: doc<-xmlInternalTreeParse(Manifest) Root = xmlRoot(doc) xpathSApply(Root, "//File[FileTypeId=10]/PatientCharacteristics/[@eName='one']", xmlAttrs) and it does not work. Might somebody help me with the syntax here? Thanks a lot!! Aaron [[alternative HTML version deleted]]
2013 Jan 22
1
Create a Data Frame from an XML
Hello, I'm attempting to read information from an XML into a data frame in R using the "XML" package. I am unable to get the data into a data frame as I would like. I have some sample code below. *XML Code:* Header... Data I want in a data frame: <data> <row BRAND="GMC" NUM="1" YEAR="1999" VALUE="10000" /> <row
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
2009 Sep 23
3
retrieve certain part from html
Dear All, Can someone please guide me how to get the certain part from a long html language? e.g. "<td><a href='2005-01.html'>2005-01</a></td><td><a href='2006-01.html'>2006-01</a></td><td><a href='2007-01.html'>2007-01</a></td><td><a
2010 Jan 10
1
xmlToDataFrame#Help!!!#follow-up
Dieter Menne pointed out that the (small) xml attachment didn't make it. Here is an in-line version (see end of message). Let's hope it works this time. I'm struggling with interpreting XML files created by ADODB as data.frames and I'm looking for advice. Note: This xlm contains a result set which comes from a rectangular data array. I've been trying to play with
2009 Nov 25
2
XML package example code?
I'm interested in parsing an html page. I should use XML, right? Could you somebody show me some example code? Is there a tutorial for this package?
2012 Nov 14
2
How to filter xml value in R?
Hi, I have one xml file. <Class> <Node1 code ="1"> First node </Node1> <Node2 code ="1"> Second node </Node2> <Node3 code ="1"> Third node </Node3> <Node1 code ="2"> Fourth node </Node1> </Class> for (i in 1:xmlSize()) { print(Class[i]) # how can i filter Node1 ? } by
2009 Nov 16
2
parsing Google search results
Hi, how can I parse Google search results? The following code returns "integer(0)" instead of "1" although the results of the query clearly contain the regex "cran". #### address <- url("http://www.google.com/search?q=cran") open(address) lines <- readLines(address) grep("cran", lines[3]) #### Thanks Philip -- Philip Leifeld Max
2011 Jun 30
0
help with interpreting what nnet() output gives:
...list of data frames, one for each station. ###### BEGIN ## start with your doc - split it into a list of nodes (one for each child) stn <- xmlChildren(doc) # converts a station node to a data frame getMyStation <- function(x){ # get the name of the station stationName <- xmlAttrs(x)["value"] # a function to extract the date and value getMyRecords <- function(x){ date <- xmlAttrs(x)["date"] val <- xmlValue(x) y <- c( date, val) return(y) } # for each child, extract the records r <- lapply(x...