我有一个 XML 字符串
<?xml version="1.0" encoding="UTF-8"?>
<ProductDetails ProductID="TuscanWengeShoeRack010cfg" ProductcfgPath="http://localhost/media/productattachment/176/TuscanWengeShoeRack010cfg.xml" SKUID="TWS090" />
我需要输出为
var pid = // should be fetched from ProductcfgPath attribute
var sku = // should be fetched from SKUID attribute
alert(pid); // 176
alert(sku); // TWS090