Hi All,
I am using XML package. Even this type of simple parse is not giving
intended result.
tissue.tree <- xmlTreeParse("
http://www.emouseatlas.org/emap/ema/theiler_stages/StageDefinition/Stage_xml/TS23.xml",
handlers=list(
anatomy=function(x,attr) {x},
component=function(x,attr) {x},
parentId=function(x,attr) {x},
startElement=function(x,attr){ NULL}, isURL=T),
asTree=T, isURL=T)
I just need componentId and parentId From that xml and remove everything
else.
thanks
avi
On Wed, May 8, 2013 at 12:37 PM, Ben Tupper <[email protected]> wrote:
> Hi,
>
> On May 8, 2013, at 3:43 AM, avinash sahu wrote:
>
> > Hi All,
> >
> > I am struggling to parse a XML file that describes a tree. The XML file
> is
> > present here:
> >
> http://www.emouseatlas.org/emap/ema/theiler_stages/StageDefinition/Stage_xml/TS23.xml
> > I want is simple list of parents id of each component. The output will
> look
> > like
> > Component = [7148 7149 7150 7151..... 7177..............]
> > Parents= [NA 7148 7149 7150.... 7148..............]
> > I meant if components are arranged from 7148 to 8419, I need their
> parents
> > id.
> >
>
> Why don't you show us the steps that you have tried? I hope you are using
> the XML package for this; if not, I highly recommend it.
>
> http://cran.r-project.org/web/packages/XML/index.html
>
> Cheers,
> Ben
>
>
>
>
>
> > I hope this is clear.
> > thanks
> > avi
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > [email protected] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> Ben Tupper
> Bigelow Laboratory for Ocean Sciences
> 60 Bigelow Drive, P.O. Box 380
> East Boothbay, Maine 04544
> http://www.bigelow.org
>
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.