Dear R users,

The following are 2 root elements contained in XML file (of 10000 root
elements).

<Pol> child element (as highlighted in 2nd root element) is missing in the
1st root element.

Consequently, when imported into R (via "xmlToDataFrame" function), the
columns ("Section", "ProductionDate" & "Vol" of the 1st root element) are
shifted to left.

Are there any methods of searching for missing child element and creating it
in the missing root element (in the same order)?

Your advice in resolving this issue would be greatly appreciated.


  <A>
    <ID>N100</ID>
    <Name>ESPN</Name>
    <Date>#2009-12-01#</Date>
    <Section>Media</Section>
    <ProductionDate>#2009-12-01#</ProductionDate>
    <Vol>13000</Vol>
  </A>
  <A>
    <ID>N101</ID>
    <Name>CNS</Name>
    <Date>#2009-12-01#</Date>
    <Pol>P239 </Pol>
    <Section>Media</Section>
    <ProductionDate>#2009-12-20#</ProductionDate>
    <Vol>15000</Vol>
  </A>



-- 
Steven

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.

Reply via email to