Perl Cd Bookshelf [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Perl Cd Bookshelf [Electronic resources] - نسخه متنی

Mark V. Scardina, Ben ChangandJinyu Wang

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Running the cppextract Application

Cppextract implements both application types described in the beginning of the chapter through different sets of command-line parameters: Since cppextract only depends upon the C run-time library and the oraxml10 library, it can be run with no explicit setup from the command line.


Running cppextract in Extraction Mode


Using the booklist.xml document you can extract a variety of data by passing in the appropriate XPath expression as the XPath parameter. The following are example command lines and their resulting extractions:

cppextract booklist.xml //book/title/text()
Node Value : The Adventures of Don Quixote
Node Value : The Iliad
booklist.xml number(//book[2]/price/text())
Numeric Value : 5
cppextract booklist.xml string(//book[2]/@*)
String Value : 5354


Running cppextract in Splitter Mode


In order to split an XML document with repeating subtrees, you can pass in the XPath expression that points to the element at the root of the subtree as the XPath parameter. Using these specific parameters will return the following XML documents:

cppextract booklist.xml "/bookcatalog/book"
<?xml version="1.0" encoding="UTF-8"?>
<book ISBN = "7564">
<title>The Adventures of Don Quixote</title>
<author_lastname>Cervantes</author_lastname>
<publisher>Oracle Press</publisher>
<year>2000</year>
<price>50.00</price>
</book>
<?xml version="1.0" encoding="UTF-8"?>
<book ISBN= "5354">
<title>The Iliad</title>
<author_lastname>Homer</author_lastname>
<publisher>Oracle Press</publisher>
<year>1000</year>
<price>5.00</price>
</book>

/ 218