#1598 Small error in XElem.copy

jessevdam Sun 31 Jul 2011

The XElem.copy function was not copying the line so I added that one

This copy()
{
  copy := XElem(name, ns)
  if (!attrList.isEmpty) copy.attrList = attrList.dup
  if (!childList.isEmpty) copy.childList = childList.dup
  copy.line = this.line //added
  return copy
}

jessevdam Fri 12 Aug 2011

I had no reply for this small one yet, just remembering

The line number is not copied to new XElem object, which causes my to loose the line where an attribute to a certain element is missing

When i do while "aAttribute" does exists

elem.attr("aAttribute")

Do I not get a line number in the error message, which is very handy when working with large xml files.

brian Fri 12 Aug 2011

Sorry not sure how I missed that, but I pushed a fix

Login or Signup to reply.