Hi Monks, The code shown in Re: Removing duplicate subtrees from XML works very well with the data shown in this posting. But with my data (as below)
<species name = "hs">
<sequence id = "1" title = "chromosome 1">
<genome_feature type = "CDS">
<gene id = "01">
<gene_seq number = "1"></gene_seq>
</gene>
</genome_feature>
</sequence>
</species>
<species name = "hs">
<sequence id = "1" title = "chromosome 1">
<genome_feature type = "CDS">
<gene id = "17">
<gene_seq number = "2"></gene_seq>
</gene>
</genome_feature>
</sequence>
</species>
I get the following error messages:
bash-2.05$ perl perl_monks_F.pl
sorted doc generation NOK:
expected:
<species name = "hs">
<sequence id = "1" title = "chromosome 1">
<genome_feature type = "CDS">
<gene id = "17">
<gene_seq number = "2"></gene_seq>
</gene>
</genome_feature>
</sequence>
</species>
found:
<species name="hs">
<sequence id="1" title="chromosome 1">
<genome_feature type="CDS">
<gene id="01">
<gene_seq number="1"></gene_seq>
</gene>
</genome_feature>
</sequence>
</species>
Use of uninitialized value in substitution (s///) at perl_monks_F.pl l
+ine 143, <DATA> chunk 2.
Use of uninitialized value in substitution (s///) at perl_monks_F.pl l
+ine 144, <DATA> chunk 2.
Use of uninitialized value in substitution (s///) at perl_monks_F.pl l
+ine 145, <DATA> chunk 2.
Use of uninitialized value in string eq at perl_monks_F.pl line 50, <D
+ATA> chunk 2.
Use of uninitialized value in concatenation (.) or string at perl_monk
+s_F.pl line 56, <DATA> chunk 2.
merged doc generation NOK:
expected:
found:
<species name="hs">
<sequence id="1" title="chromosome 1">
<genome_feature type="CDS">
<gene id="01">
<gene_seq number="1"></gene_seq>
</gene>
</genome_feature>
</sequence>
</species>
bash-2.05$
Alterations that I made to the provided script were the addition of a few ErrorContext => 1 statements. And I have tested these slight alterations with the data used in the top posting link.
In reply to XML::Twig
by matth
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|