Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm working with a large, very deep set of XML data, and mostly my perl script needs to read in the XML - parse the data, do a few modifications/alterations/aggregations, then dump to a DB.
The source XML has a xmls tag defined in the root, which is completely irrelevant to what I am doing with it. As we all know, LibXML becomes a serious pain to work with when namespaces are defined like this, and since I am traveling to 8 or 9 levels of child nodes multiple times, and doing operations on each, I fear for my sanity having to redefine and declare the XPathContext.
So my question is simple, is there any way (barring a sed on the source to remove it before parsing..) to remove namespace from the LibXML parsed object? There seem to be plenty of ways to define new ones, and I haven't seen a definitive answer yet anywhere on this one.
Your thoughts are appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LibXML - Removing Namespace?
by derby (Abbot) on Apr 11, 2008 at 17:33 UTC | |
by Anonymous Monk on Apr 11, 2008 at 20:43 UTC | |
by Anonymous Monk on Apr 11, 2008 at 20:58 UTC | |
|
Re: LibXML - Removing Namespace?
by Your Mother (Archbishop) on Apr 11, 2008 at 18:06 UTC |