All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmAndAndroidMain.org.jetbrains.compose.resources.ImageResources.jvmAndAndroid.kt Maven / Gradle / Ivy

There is a newer version: 1.7.0-beta02
Show newest version
package org.jetbrains.compose.resources

import org.jetbrains.compose.resources.vector.xmldom.Element
import org.jetbrains.compose.resources.vector.xmldom.ElementImpl
import org.xml.sax.InputSource
import java.io.ByteArrayInputStream
import javax.xml.parsers.DocumentBuilderFactory

internal actual fun ByteArray.toXmlElement(): Element = ElementImpl(
    DocumentBuilderFactory.newInstance()
        .apply { isNamespaceAware = true }
        .newDocumentBuilder()
        .parse(InputSource(ByteArrayInputStream(this)))
        .documentElement
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy