Takes in a local xml path and returns a full path.
        if @xml_path is absolute, do nothing
        if @xml_path is not absolute, load xml that is shipped by the package
515772
def xml_path_completion(xml_path):
    
    if xml_path.startswith("/"):
        full_path = xml_path
    else:
        full_path = os.path.join(robosuite.models.assets_root, xml_path)
    return full_path
955294
def set_xml_tosign_from_path(xml_path)
            file = File.open(xml_path, 'rb')
            @xml_content_base64 = Base64.encode64(file.read)
            file.close

            @xml_content_base64
        end
924511
def parse_localinstancepath(self, tup_tree):
        

        self.check_node(tup_tree, 'LOCALINSTANCEPATH')

        k = kids(tup_tree)

        if len(k) != 2:
            raise CIMXMLParseError(
                _format("Element {0!A} has invalid number of child elements "
                        "{1!A} (expecting two child elements "
                        "(LOCALNAMESPACEPATH, INSTANCENAME))",
                        name(tup_tree), k),
                conn_id=self.conn_id)

        namespace = self.parse_localnamespacepath(k[0])
        inst_path = self.parse_instancename(k[1])
        inst_path.namespace = namespace

        return inst_path
553144
def performXpath(parent, xpath):
    
    loop = False
    if xpath.startswith(".//"):
        result = parent.xpath(
            xpath.replace(".//", "./", 1),
            namespaces=XPATH_NAMESPACES
        )
        if len(result) == 0:
            result = parent.xpath(
                "*[{}]".format(xpath),
                namespaces=XPATH_NAMESPACES
            )
            loop = True
    else:
        result = parent.xpath(
            xpath,
            namespaces=XPATH_NAMESPACES
        )
    return result[0], loop
414313
def get_data(self, path, **params):
        
        xml = self.get_response(path, **params)
        try:
            return parse(xml)
        except Exception as err:
            print(path)
            print(params)
            print(err)
            raise
592417
def from_file(cls, xml_path):
    """"""
    try:
      parsed_xml = cls._parse(xml_path)
    except OSError as e:
      raise XmlParser.XmlError("Problem reading xml file at {}: {}".format(xml_path, e))
    return cls(xml_path, parsed_xml)
222624
def full_path(path):
    """"""
    return os.path.realpath(os.path.expanduser(os.path.expandvars(path)))
199503
def import_course(course_id, path)
			xml = connection.call("rustici.course.importCourse", :courseid => course_id, :path => path)
			if xml.elements['//rsp/importresult'].attributes["successful"] == "true"
				title = xml.elements['//rsp/importresult/title'].text	
				{ :title => title, :warnings => [] }
			else
				nil
			end
		end
1027418
def packageFromPath(path, includeModule=False):
    
    path = nstr(path)
    module = ''
    if os.path.isfile(path):
        path, fname = os.path.split(path)
        if fname.endswith('.py') and fname != '__init__.py':
            module = fname.split('.')[0]

    parts = os.path.normpath(path).split(os.path.sep)
    package_parts = []

    for i in range(len(parts), 0, -1):
        filename = os.path.sep.join(parts[:i] + ['__init__.py'])

        if not os.path.isfile(filename):
            break

        package_parts.insert(0, parts[i - 1])

    if includeModule and module:
        package_parts.append(module)

    return '.'.join(package_parts)
993841
def fromXml(cls, xdata, filepath=''):
        
        builder = cls()
        builder.loadXml(xdata, filepath=filepath)
        return builder
1103063
def _get_fullpath(self, filepath):
        
        if filepath[0] == '/':
            return filepath
        return os.path.join(self._base_path, filepath)
563607
def get(uri)
      uri = Resync::XML.to_uri(uri)
      @helper.fetch(uri: uri)
    end
3075
def fullpath(relpath):
    ''''''
    if (type(relpath) is object or type(relpath) is file):
        relpath = relpath.name
    return os.path.abspath(os.path.expanduser(relpath))
1316672
def load(self, path):
        
        meta = self._loadMetaFromJson(path)
        return CompleteMeasurement(meta, self.dataDir) if meta is not None else None
1305802
def to_xml
      template_path = File.join(File.dirname(__FILE__), '..', '..', 'templates', 'schema.xml.erb')
      template_text = File.read(template_path)

      erb = if RUBY_VERSION >= '2.6'
        ERB.new(template_text, trim_mode: '-')
      else
        ERB.new(template_text, nil, '-')
      end

      erb.result(binding)
    end
434178
def parse_localclasspath(self, tup_tree):
        

        self.check_node(tup_tree, 'LOCALCLASSPATH')

        k = kids(tup_tree)

        if len(k) != 2:
            raise CIMXMLParseError(
                _format("Element {0!A} has invalid number of child elements "
                        "{1!A} (expecting two child elements "
                        "(LOCALNAMESPACEPATH, CLASSNAME))", name(tup_tree), k),
                conn_id=self.conn_id)

        namespace = self.parse_localnamespacepath(k[0])
        class_path = self.parse_classname(k[1])
        class_path.namespace = namespace

        return class_path
947641
def _load_builtin_xml(xmlpath, parser):
    
    #First we need to get hold of the fortpy directory so we can locate
    #the isense/builtin.xml file.
    result = {}

    el = ET.parse(xmlpath).getroot()
    if el.tag == "builtin":
        for child in el:
            anexec = _parse_xml(child, parser)
            result[anexec.name.lower()] = anexec

    return result