copying nodes from one xml file to an other
Kristian Kankainen <[email protected]>
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Message-ID | <[email protected]> |
Hello!
I would like to merge information from an external text file (a Praat
TextGrid for the curious) into existing XML files, changing it's
element structure.
To do this, I thought of iterating through the XML file, and match
some elements to the TextGrid, and bring back the information found
from the matching into (a possible new) XML file.
I have succesfully created the "iterators" for both file types, and
now here's the problem:
using XML::LibXML
* how do i copy a node from one DOM to an other?
now I am using XML::LibXML::Reader for the xml-iterating and my own
data structure for the TextGrid file
thanks - aitäh!
Kristian
Verbose version of my problem:
I have an xml with this structure
<record>
<mark>
text_word
</mark>
</record>
and a TextGrid with this information
text: "text_word"
xmin: 0
xmax:
and this is what i want to produce
<record>
<clause xmin="0" xmax="0.79032485">
<mark>
text_word
</mark>
</clause>
</record>
and i have problems only with the "cut-and-pasting" and creating of
nodes with the xml::libxml module.
verbose thanks - tänan väga! (estonian)
Kristian
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs