Skip to Main Content
Mathematica 錦囊妙計
book

Mathematica 錦囊妙計

by Sal Mangano
April 2014
Beginner to intermediate content levelBeginner to intermediate
830 pages
15h 21m
Chinese
GoTop Information, Inc.
Content preview from Mathematica 錦囊妙計
5.8 匯入 XML
|
211
根元素的標籤
第一個子元素
模式匹配較為簡潔且對結構的調整較有彈性。以擷取男性元素為例,使用
Cases
指令搭
配模式,並指定作用層數為無限大。這幾乎等同於使用
XPath
讀取 XML 的處理方式。
ch05.indd 211 2014/4/2 上午 06:13:23
212
|
第五章
有時
XMLObject
XMLElement
的語法過於冗長,使用簡單的巢狀串列方式較容易處理,
可利用
Apply
指令將所有層數的標頭置換為
List
[Page-212]
擷取資料內容時可縮短模式的撰寫。
籤, 使
//.
ReplaceRepeated
)與規則式將
XMLObject
標頭刪除,並將
XMLElement
轉換為符號。
將轉換的輸出結果以樹狀圖表示可更清楚。
ch05.indd 212 2014/4/2 上午 06:13:24
5.9 使用模式及規則式轉換 XML
|
213
將字串轉
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ubuntu for Non-Geeks, 4th Edition

Ubuntu for Non-Geeks, 4th Edition

Rickford Grant, Phil Bull

Publisher Resources

ISBN: 9789863470106