Main.TAPoRwareExtractXML (r1.1 vs. r1.4)
Diffs

 <<O>>  Difference Topic TAPoRwareExtractXML (r1.4 - 21 Feb 2007 - GeoffreyRockwell)

META TOPICPARENT TAPoRware

Extract from xml tool

See: http://taporware.mcmaster.ca/~taporware/xmlTools/xmlquery.shtml
Line: 6 to 6

Description

Changed:
<
<
The Extract from xml tool allows you to specify an element or attribute/value combination and extract all the elements that match. Thus one can extract the paragraph elements from an XML file.
>
>
The Extract from xml tool allows you to specify an element or attribute/value combination and extract all the elements that match. Thus one can extract the paragraph elements from an XML file. You can use an XPath in the "Element" field for more complicated extraction.

History

Line: 24 to 24

  • Select output format
  • Click "submit" button
Added:
>
>

XPath

To retrieve using XPath you enter the XPath into the "Element" field. For example, //Xitem[Xdate[@xyear='2007']] will retrieve all parent elements "Xitem" whose "Xdate" child has the "xyear" attribute with a value of "2007". This would return the whole "Xitem" that might include an "Xtext" element that is a sibling to "Xdate" and has the text you want.


CGI Interface

If you want to use this tool from your web site, here is the CGI Interface:


 <<O>>  Difference Topic TAPoRwareExtractXML (r1.3 - 19 Jul 2006 - LianYan)

META TOPICPARENT TAPoRware

Extract from xml tool

See: http://taporware.mcmaster.ca/~taporware/xmlTools/xmlquery.shtml
Line: 12 to 12

Pseudocode

Added:
>
>
  • Obtain XML string by URL or from user's local disk
  • Extract text based on user specified element(s)
  • Generate output based on user specified display format

Ways of Using

Added:
>
>
  • Enter a valid URL in the URL field or enter a local upload html text (Note: this text must be xml)
  • Enter valid xml element names of the input xml source seperated by comma, default is "//"
  • If you want to specify attribute, enter them in the corresponding fields in pairs
  • Select output format
  • Click "submit" button

CGI Interface

Added:
>
>
If you want to use this tool from your web site, here is the CGI Interface: (Note: you need to use attribute name/value pair: enctype="multipart/form-data" within the form tag because the script is written with file uploading in mind)

Here are the parameters:

Parameter Name Parameter Value Control Type Default Discription
source url/local radio button url Let user select input text (either a url or upload local xml text)
xmlurl   text   A valid URL that the pointed document should be an xml text
localFile   file   The path to your local xml text file
xmlpath   text // Valid xml element names (paths) or multple xml element names (paths) separated by comma
attr_name   text   Valid xml attribute name of the input xml docs
attr_value   text   Valid xml attribute value corresponding to the attribute name
HowToDisplay 1/2/3 selection 1 Display format which are HTML/XML text in HTML/XML tree in the order of parameter values
taporface   checkbox checked display result in a new window without graphics interface (default) or with taporware interface in the same window

Web Service Interface

Added:
>
>
Taporware provides web services to any non-benefit organizations. Here is the taporware web services infomation:

  • Endpoint URL: http://taporware.mcmaster.ca:9982
  • Service URI: http://taporware.mcmaster.ca/~taporware/webservice
  • Service Method: extract_Text_XML
  • parameters:
    • xmlInput -- any xml string
    • element -- any valid xml element name in the input xml text
    • attributeName -- any valid attribute name in the input xml text
    • attributeValue -- the attribute value corresponding to the attribute name above
    • outFormat -- values are same as parameter "textdisp" in the CGI interface above

Known Bugs

To Do


 <<O>>  Difference Topic TAPoRwareExtractXML (r1.2 - 15 Oct 2005 - MattPatey)

META TOPICPARENT TAPoRware

Extract from xml tool

Changed:
<
<
The Extract from xml tool allows you to specify an element or attribute/value combination and extract all the elements that match. Thus one can extract the paragraph elements from an XML file.
>
>
See: http://taporware.mcmaster.ca/~taporware/xmlTools/xmlquery.shtml

Description

Added:
>
>
The Extract from xml tool allows you to specify an element or attribute/value combination and extract all the elements that match. Thus one can extract the paragraph elements from an XML file.

History


 <<O>>  Difference Topic TAPoRwareExtractXML (r1.1 - 17 May 2005 - GeoffreyRockwell)
Line: 1 to 1
Added:
>
>
META TOPICPARENT TAPoRware

Extract from xml tool

The Extract from xml tool allows you to specify an element or attribute/value combination and extract all the elements that match. Thus one can extract the paragraph elements from an XML file.

Description

History

Pseudocode

Ways of Using

CGI Interface

Web Service Interface

Known Bugs

To Do

  • We need to add an X-Path field to the Subtext limited to panel so one can specify more complicated subtexts.

-- GeoffreyRockwell - 17 May 2005


Topic: TAPoRwareExtractXML . { View | Diffs | r1.4 | > | r1.3 | > | r1.2 | More }

Revision r1.1 - 17 May 2005 - 14:10 - GeoffreyRockwell
Revision r1.4 - 21 Feb 2007 - 20:47 - GeoffreyRockwell