提取JSON文件我有以下的有效的JSON通過以下方式,使用angularjs
{
"cancelled": false,
"text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<PrintLetterBarcodeData uid=\"345135084445\" name=\"Venkatasiva M\" gender=\"M\" yob=\"1985\" co=\"S/O Narayana\" vtc=\"Pamidi vari palem\" dist=\"Guntur\" state=\"Andhra Pradesh\" pc=\"522112\"/>",
"format": "QR_CODE"
}
我如何提取uid和從JSON文件中的個人信息(姓名,性別和yob)。
這個答案我相信會解決你的問題。 http://stackoverflow.com/questions/9611450/how-to-get-value-from-xml-string-with-node-js – httpNick