diff --git a/docs/ModConf/functions/DOMParser.md b/docs/ModConf/functions/DOMParser.md new file mode 100644 index 00000000..37d1d71f --- /dev/null +++ b/docs/ModConf/functions/DOMParser.md @@ -0,0 +1,37 @@ +# DOMParser + +## Usage + +```js +import React from "react"; +import { Page } from "@mmrl/ui"; +import { List, ListItem, ListItemText } from "@mui/material"; + +const dom = new DOMParser(); + +const configStore = dom.parseFromFile( + "/data/misc/apexdata/com.android.wifi/WifiConfigStoreSoftAp.xml" +); + +const softap = configStore.getElementsByTagName("SoftAp")[0]; + +const ssidName = softap + .querySelector('string[name="WifiSsid"]') + .innerHTML.replace(/"(.+)"/g, "$1"); +const passwd = softap.querySelector('string[name="Passphrase"]').innerHTML; + +export default () => { + return ( + + + + + + + + + + + ); +}; +```