# Path: confopy/pdfextract/xml_util.py
# def getChildElementsByTagName(node, tagName):
# def escape(string):


import operator
import unicodedata
        import random
    import sys
from confopy.pdfextract import xml_util
    from xml.dom.minidom import parse
        l = lines[i].strip()
        if take_from_new_lines:
            l = new_lines[i]
            new_lines.pop()
            take_from_new_lines = False
        if l.endswith(u"-"):
            if i + 1 < len(lines):
                next_l = lines[i + 1].strip()
                if next_l is not u"":
                    next_l_words = next_l.split()
                    if len(next_l_words) > 0:
                        if next_l[0].islower():
                            l = l[:-1] + next_l_words[0]
                        else:
                            l = l + next_l_words[0]
                        new_lines.append(l)
                        l = u" ".join(next_l_words[1:])
                        take_from_new_lines = True
                        new_lines.append(l)
        else:
            new_lines.append(l)
        i += 1
    return new_lines


def DOM2textgroup(dom_textgroup):
    bbox = str2bbox(dom_textgroup.getAttribute("bbox"))
    textboxes = map( DOM2textbox
                   , xml_util.getChildElementsByTagName(dom_textgroup, "textbox"))
    children = map( DOM2textgroup

# Path: confopy/pdfextract/xml_util.py
# def getChildElementsByTagName(node, tagName):
# def escape(string):


# Path: confopy/pdfextract/pdfminer_xml_bindings.py
import operator
import unicodedata
        import random
    import sys
from confopy.pdfextract import xml_util
    from xml.dom.minidom import parse

        l = lines[i].strip()
        if take_from_new_lines:
            l = new_lines[i]
            new_lines.pop()
            take_from_new_lines = False
        if l.endswith(u"-"):
            if i + 1 < len(lines):
                next_l = lines[i + 1].strip()
                if next_l is not u"":
                    next_l_words = next_l.split()
                    if len(next_l_words) > 0:
                        if next_l[0].islower():
                            l = l[:-1] + next_l_words[0]
                        else:
                            l = l + next_l_words[0]
                        new_lines.append(l)
                        l = u" ".join(next_l_words[1:])
                        take_from_new_lines = True
                        new_lines.append(l)
        else:
            new_lines.append(l)
        i += 1
    return new_lines


def DOM2textgroup(dom_textgroup):
    bbox = str2bbox(dom_textgroup.getAttribute("bbox"))
    textboxes = map( DOM2textbox
                   , xml_util.getChildElementsByTagName(dom_textgroup, "textbox"))
    children = map( DOM2textgroup

                  , xml_util.getChildElementsByTagName(dom_textgroup, "textgroup"))