in reply to placing an existing line from my XML file to the top of the file

Why? In the sample XML you provide that doesn't seem a sensible thing to do as it would break the XML. What is the problem you are trying to solve by moving that line?

Premature optimization is the root of all job security
  • Comment on Re: placing an existing line from my XML file to the top of the file

Replies are listed 'Best First'.
Re^2: placing an existing line from my XML file to the top of the file
by gasjunkie_jabz (Novice) on Aug 19, 2015 at 15:57 UTC

    Thanks for reply. I am trying to match an XML schema that gets created by a different Test Infrastructure.

      I am trying to match an XML schema that gets created by a different Test Infrastructure.

      Then better don't think in terms of lines. XML has no concept of lines. With a few exceptions, line breaks, spaces and tabs are all the same for XML, and it does not matter if you use one, two, ten or a million of them. The only sane way to work with XML is to use XML tools. XML::LibXML is one of those tools.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)