search for: xmlinternaltreeparse

Displaying 8 results from an estimated 8 matches for "xmlinternaltreeparse".

2009 Jan 23
1
XML package help
...</File> </FilesList> </Manifest> I am attempting to use XML package and xpathSApply() to extract, say, the eValue 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]]
2009 Mar 02
2
Need help extracting info from XML file using XML package
I have an XML file that has within it the coordinates of some polygons that I would like to extract and use in R. The polygons are nested rather deeply. For example, I found by trial and error that I can extract the coordinates of one of them using functions from the XML package: doc <- xmlInternalTreeParse('doc.kml') docroot <- xmlRoot(doc) pgon <- xmlValue(docroot[[52]][[3]][[7]][[3]][[3]][[1]][[1]]) but this is hardly general! I'm hoping there is some relatively straightforward way to use functions from the XML package to recursively descend the structure and return t...
2013 Jan 22
2
Creating a Data Frame from an XML
...t; YEAR="1967" VALUE="PRICLESS" /> <row BRAND="FORD" NUM="1" YEAR="2007" VALUE="17500" /> <row BRAND="GMC" NUM="1" YEAR="2008" VALUE="22000" /> </data> *R Code:* doc< -xmlInternalTreeParse ("Sample2.xml") top <- xmlRoot (doc) xmlName (top) names (top) art <- top [["row"]] art ** *Output:* > art<row BRAND="GMC" NUM="1" YEAR="1999" VALUE="10000"/> This is where I am having difficulties. I am unable to &quo...
2013 Jan 22
1
Create a Data Frame from an XML
...t; YEAR="1967" VALUE="PRICLESS" /> <row BRAND="FORD" NUM="1" YEAR="2007" VALUE="17500" /> <row BRAND="GMC" NUM="1" YEAR="2008" VALUE="22000" /> </data> *R Code:* doc< -xmlInternalTreeParse ("Sample2.xml") top <- xmlRoot (doc) xmlName (top) names (top) art <- top [["row"]] art ** *Output:* > art<row BRAND="GMC" NUM="1" YEAR="1999" VALUE="10000"/> * * This is where I am having difficulties. I am unable to &...
2012 Nov 01
1
How to parse xml with same key name ?
HI, I need to parse an xml where key name are same but values are different. <root> <test> Some dummy text </test> <node id="1">one</node> <node id="2">two</node> <node id="3">three</node> </root> When i use xmlGetAttr() function i always get one as value. How
2008 Nov 05
2
How to extract following data
Hi everyone, I have this kind of raw dataset : - <Temp diffgr:id="Temp14" msdata:rowOrder="13"> <Date>2005-01-17T00:00:00+05:30</Date> <SecurityID>10149</SecurityID> <PriceClose>1288.40002</PriceClose> </Temp> - <Temp diffgr:id="Temp15" msdata:rowOrder="14">
2012 Dec 28
0
How to apply XPath query on XML nodes separately?
...ted uniprot-entry-tags as returned by function # 'getNodeSet'. # if ( ! is.null( uniprot.xml ) && '' != uniprot.xml && ! grepl( uniprot.error.msg.regex, uniprot.xml ) ) { ns <- c( xmlns="http://uniprot.org/uniprot" ) getNodeSet( xmlInternalTreeParse( uniprot.xml ), "//xmlns:entry", namespaces=ns ) } else { NULL } } extractExperimentallyVerifiedGoAnnos <- function( doc ) { # Uses XPath to extract those GO annotations that are experimentally # verified. Note, that warnings generated by calls to the XML library...
2012 Jun 11
0
SSOAP Parameter Structures: Nested Arrays
..."cacert.pem", package = "RCurl"), ssl.verifypeer = FALSE)) curlSetOpt(.opts = list(proxy = 'proxyserver:port'), curl = curl) wsdl <- getURL("XXXXXX.asmx?wsdl", ssl.verifypeer = FALSE) doc <- xmlInternalTreeParse(wsdl) def <- processWSDL(doc) ff <- genSOAPClientInterface(def = def) # Create the BatchMessage Array above bm <- new("BatchMessage", Message = "XXXX", MessageID = &q...