Using XML Tools - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Using XML Tools

Description:

Available: http://download.cnet.com/downloads/0-10085-100-2729088.html?tag=st.dl. ... Download my sample xsl stylesheet from: http://www.cstp.umkc.edu/~qchong ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 10
Provided by: quddus3
Category:
Tags: xml | cnet | downloads | tools | using

less

Transcript and Presenter's Notes

Title: Using XML Tools


1
Using XML Tools
  • CS551 Fall 2001

2
Tools available
  • XML Notepad
  • Jcreator
  • IBM XML4J
  • Xalan

3
XML Notepad
  • Editor to create well-formed xml documents, xml
    schema, xsl stylesheets.
  • Available http//msdn.microsoft.com/library/defau
    lt.asp?url/library/en-us/dnxml/html/xmlpaddownloa
    d.asp
  • Can insert element, child element, attributes,
    comment, and text nodes.
  • Does not create DTDs or insert PI, CDATA (use
    regular notepad or Peters XML editor 1.1).

4
  • Open XML Notepad in your Start Bar.
  • Enter the information below
  • Save as simple.xml
  • Open simple.xml in Internet Explorer.

5
Jcreator 1.5
  • Fully-functional Java IDE.
  • Available http//download.cnet.com/downloads/0-10
    085-100-2729088.html?tagst.dl.10001-103-1.lst-7-1
    .2729088
  • Set classpath to c\jdk1.3.1
  • Configure -gt Options -gt JDK Profiles -gt select
    JDK version 1.3.1 -gt Edit -gt Home path () -gt
    select path c\jdk1.3.1
  • To run/execute project with command-line
    arguments
  • Project -gt Project Settings -gt JDK Tools -gt
    Select tool type Run Application -gt select
    ltDefaultgt -gt Edit -gt Parameters -gt set Prompt
    for main function argument checkbox to True.

6
IBM XML4J 3.2.1
  • A validating XML parser written in 100 pure Java
    that contains classes and methods for parsing,
    generating, manipulating, and validating XML
    documents.
  • Available http//www.alphaworks.ibm.com/tech/xml4
    j
  • Current version supports up to DOM level 2, SAX
    2.0, xml schema recommendation, and JAXP 1.1.
  • Includes Xerces Jv.1.4.1 .jar file.
  • To use the classes in XML4J, you must set your
    Java CLASSPATH variable so that Java can locate
    the xerces.jar and xercesSamples.jar files
  • (in Jcreator) Configure -gt Options -gt JDK
    Profiles -gt select JDK version -gt Edit -gt Add
    Package -gt add c/xml4j-j-bin.3.2.1/xerces.jar
    and c/xml4j-j-bin.3.2.1/xercesSamples.jar

7
Running the TreeViewer sample
  • (in Jcreator) File -gt New gt Empty Project -gt
    Project name treeviewer
  • In Workspace window (top left) -gt select
    treeviewer project -gt right click -gt Add Files
    -gt add the following files from
    c\xml4j-j-bin.3.2.1\samples\ui\ (TreeView.java,
    TreeViewer.java, DOMTree.java, and
    DefaultImages.java).
  • Build -gt Compile Project
  • Copy your file simple.xml into your treeviewer
    project directory.
  • Build -gt Execute Project -gt Set Run Configuration
    -gt Ok -gt Set main function argument -gt type
    simple.xml -gt Ok
  • See more samples at c\xml4j-j-bin.3.2.1\docs\htm
    l\samples.html

8
Apache Xalan 1.5
  • Xalan is an XSLT processor for transforming XML
    documents into HTML, text, or other XML document
    types.
  • Available http//xml.apache.org/xalan-j/index.htm
    l
  • Current version supports W3C XSLT 1.0 and Xpath
    1.0 recommendations.
  • Includes Xerces Jv.1.4.3 .jar file.
  • To set the classpath in Jcreator
  • Configure -gt Options -gt JDK Profiles -gt select
    JDK version -gt Edit -gt Delete -gt
    c\xml4j-j-bin.3.2.1\xerces.jar
  • Add -gt c\xalan-j_2_2_D10\bin\xalan.jar
  • Add -gt c\xalan-j_2_2_D10\bin\xerces.jar

9
Running a XSL transformation
  • Download my sample xsl stylesheet from
    http//www.cstp.umkc.edu/qchong/simple.xsl
  • (in Jcreator) File -gt New gt Empty Project -gt
    Project name transform
  • In Workspace window (top left) -gt select
    transform project -gt right click -gt Add Files
    -gt add c\xalan-j-2_2_D10\samples\SimpleTransform\
    SimpleTranform.java
  • Build -gt Compile Project
  • Copy your file simple.xml and simple.xsl into
    your transform project directory.
  • Build -gt Execute Project -gt Set Run Configuration
    -gt Ok -gt Set main function argument -gt type
    simple.xsl simple.xml simple.html -gt Ok
  • See more samples at c\xalan-j-2_2_D10\samples\
Write a Comment
User Comments (0)
About PowerShow.com