Newer
Older
This program invokes the SAX Parser, and then prints the
number of elements, attributes, spaces and characters found
in each XML file, using SAX API.
-l Indicate the input file is a List File that has a list of xml files.
Default to off (Input file is an XML file).
-v=xxx Validation scheme [always | never | auto*].
-n Enable namespace processing. Defaults to off.
-s Enable schema processing. Defaults to off.
-f Enable full schema constraint checking. Defaults to off.
-locale=ll_CC specify the locale, default: en_US.
-? Show this help.
* = Default if not provided explicitly.
personal.xml:{timing removed}(37 elems, 12 attrs, 0 spaces, 268 chars)
personal.xml:{timing removed}(37 elems, 12 attrs, 134 spaces, 134 chars)
personal-schema.xml:{timing removed}(37 elems, 29 attrs, 140 spaces, 128 chars)
Usage:
This program invokes the SAX Parser, and then prints the
data returned by the various SAX handlers for the specified
XML file.
-u=xxx Handle unrepresentable chars [fail | rep | ref*].
-v=xxx Validation scheme [always | never | auto*].
-n Enable namespace processing.
-f Enable full schema constraint checking.
-x=XXX Use a particular encoding for output (LATIN1*).
-? Show this help.
* = Default if not provided explicitly.
The parser has intrinsic support for the following encodings:
UTF-8, USASCII, ISO8859-1, UTF-16[BL]E, UCS-4[BL]E,
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?xml version="1.0" encoding="LATIN1"?>
<personnel>
<person id="Big.Boss">
<name><family>Boss</family> <given>Big</given></name>
<email>chief@foo.com</email>
<link subordinates="one.worker two.worker three.worker four.worker five.worker"></link>
</person>
<person id="one.worker">
<name><family>Worker</family> <given>One</given></name>
<email>one@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="two.worker">
<name><family>Worker</family> <given>Two</given></name>
<email>two@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="three.worker">
<name><family>Worker</family> <given>Three</given></name>
<email>three@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="four.worker">
<name><family>Worker</family> <given>Four</given></name>
<email>four@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="five.worker">
<name><family>Worker</family> <given>Five</given></name>
<email>five@foo.com</email>
<link manager="Big.Boss"></link>
</person>
</personnel><?xml version="1.0" encoding="LATIN1"?>
<personnel>
<person id="Big.Boss">
<name><family>Boss</family> <given>Big</given></name>
<email>chief@foo.com</email>
<link subordinates="one.worker two.worker three.worker four.worker five.worker"></link>
</person>
<person id="one.worker">
<name><family>Worker</family> <given>One</given></name>
<email>one@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="two.worker">
<name><family>Worker</family> <given>Two</given></name>
<email>two@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="three.worker">
<name><family>Worker</family> <given>Three</given></name>
<email>three@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="four.worker">
<name><family>Worker</family> <given>Four</given></name>
<email>four@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="five.worker">
<name><family>Worker</family> <given>Five</given></name>
<email>five@foo.com</email>
<link manager="Big.Boss"></link>
</person>
</personnel><?xml version="1.0" encoding="LATIN1"?>
<?proc-inst-1 'foo' ?><personnel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="personal.xsd">
<person id="Big.Boss" contr="false">
<name xml:base="foo/bar"><family xml:base="bar/bar">Boss</family> <given xml:base="car/bar">Big</given><?proc-inst-2 'foobar' ?></name>
<email>chief@foo.com</email>
<link subordinates="one.worker two.worker three.worker four.worker five.worker"></link>
</person>
<person id="one.worker" xml:base="/auto/bar" contr="false">
<name xml:base="/car/foo/"><family xml:base="bar/bar">Worker</family> <given>One</given></name>
<email>one@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="two.worker" xml:base="http://www.example.com/car/car" contr="false">
<name xml:base="/bar/foo/"><family xml:base="foo/bar">Worker</family> <given>Two</given></name>
<email>two@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="three.worker" contr="false">
<name><family>Worker</family> <given>Three</given></name>
<email>three@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="four.worker" contr="false">
<name><family>Worker</family> <given>Four</given></name>
<email>four@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="five.worker" contr="false">
<name><family>Worker</family> <given>Five</given></name>
<email>five@foo.com</email>
<link manager="Big.Boss"></link>
</person>
This program invokes the SAX2XMLReader, and then prints the
number of elements, attributes, spaces and characters found
in each XML file, using SAX2 API.
-l Indicate the input file is a List File that has a list of xml files.
Default to off (Input file is an XML file).
-v=xxx Validation scheme [always | never | auto*].
-f Enable full schema constraint checking processing. Defaults to off.
-p Enable namespace-prefixes feature. Defaults to off.
-n Disable namespace processing. Defaults to on.
NOTE: THIS IS OPPOSITE FROM OTHER SAMPLES.
-s Disable schema processing. Defaults to on.
NOTE: THIS IS OPPOSITE FROM OTHER SAMPLES.
-locale=ll_CC specify the locale, default: en_US.
-? Show this help.
* = Default if not provided explicitly.
personal.xml:{timing removed}(37 elems, 12 attrs, 0 spaces, 268 chars)
personal.xml:{timing removed}(37 elems, 12 attrs, 134 spaces, 134 chars)
personal-schema.xml:{timing removed}(37 elems, 29 attrs, 140 spaces, 128 chars)
Usage:
SAX2Print [options] <XML file>
This program invokes the SAX2XMLReader, and then prints the
data returned by the various SAX2 handlers for the specified
XML file.
-u=xxx Handle unrepresentable chars [fail | rep | ref*].
-v=xxx Validation scheme [always | never | auto*].
-e Expand Namespace Alias with URI's. Defaults to off.
-x=XXX Use a particular encoding for output (LATIN1*).
-f Enable full schema constraint checking processing. Defaults to off.
-p Enable namespace-prefixes feature. Defaults to off.
-n Disable namespace processing. Defaults to on.
NOTE: THIS IS OPPOSITE FROM OTHER SAMPLES.
-s Disable schema processing. Defaults to on.
NOTE: THIS IS OPPOSITE FROM OTHER SAMPLES.
-sa Print the attributes in alfabetic order. Defaults to off.
-? Show this help.
* = Default if not provided explicitly.
The parser has intrinsic support for the following encodings:
UTF-8, USASCII, ISO8859-1, UTF-16[BL]E, UCS-4[BL]E,
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
<?xml version="1.0" encoding="LATIN1"?>
<personnel>
<person id="Big.Boss">
<name><family>Boss</family> <given>Big</given></name>
<email>chief@foo.com</email>
<link subordinates="one.worker two.worker three.worker four.worker five.worker"></link>
</person>
<person id="one.worker">
<name><family>Worker</family> <given>One</given></name>
<email>one@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="two.worker">
<name><family>Worker</family> <given>Two</given></name>
<email>two@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="three.worker">
<name><family>Worker</family> <given>Three</given></name>
<email>three@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="four.worker">
<name><family>Worker</family> <given>Four</given></name>
<email>four@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="five.worker">
<name><family>Worker</family> <given>Five</given></name>
<email>five@foo.com</email>
<link manager="Big.Boss"></link>
</person>
</personnel><?xml version="1.0" encoding="LATIN1"?>
<personnel>
<person id="Big.Boss">
<name><family>Boss</family> <given>Big</given></name>
<email>chief@foo.com</email>
<link subordinates="one.worker two.worker three.worker four.worker five.worker"></link>
</person>
<person id="one.worker">
<name><family>Worker</family> <given>One</given></name>
<email>one@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="two.worker">
<name><family>Worker</family> <given>Two</given></name>
<email>two@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="three.worker">
<name><family>Worker</family> <given>Three</given></name>
<email>three@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="four.worker">
<name><family>Worker</family> <given>Four</given></name>
<email>four@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="five.worker">
<name><family>Worker</family> <given>Five</given></name>
<email>five@foo.com</email>
<link manager="Big.Boss"></link>
</person>
</personnel><?xml version="1.0" encoding="LATIN1"?>
<?proc-inst-1 'foo' ?><personnel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="personal.xsd">
<person id="Big.Boss" contr="false">
<name xml:base="foo/bar"><family xml:base="bar/bar">Boss</family> <given xml:base="car/bar">Big</given><?proc-inst-2 'foobar' ?></name>
<email>chief@foo.com</email>
<link subordinates="one.worker two.worker three.worker four.worker five.worker"></link>
</person>
<person id="one.worker" xml:base="/auto/bar" contr="false">
<name xml:base="/car/foo/"><family xml:base="bar/bar">Worker</family> <given>One</given></name>
<email>one@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="two.worker" xml:base="http://www.example.com/car/car" contr="false">
<name xml:base="/bar/foo/"><family xml:base="foo/bar">Worker</family> <given>Two</given></name>
<email>two@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="three.worker" contr="false">
<name><family>Worker</family> <given>Three</given></name>
<email>three@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="four.worker" contr="false">
<name><family>Worker</family> <given>Four</given></name>
<email>four@foo.com</email>
<link manager="Big.Boss"></link>
</person>
<person id="five.worker" contr="false">
<name><family>Worker</family> <given>Five</given></name>
<email>five@foo.com</email>
<link manager="Big.Boss"></link>
</person>
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
</personnel><?xml version="1.0" encoding="LATIN1"?>
<xs:schema>
<xs:import namespace="http://www.w3.org/XML/1998/namespace">
<xs:annotation>
<xs:documentation>
The schemaLocation of the relevant file is
"http://www.w3.org/2001/xml.xsd"; however,
we don't want to assume people are always
connected to the 'net when playing with this file.
</xs:documentation>
</xs:annotation>
</xs:import>
<xs:element name="personnel">
<xs:complexType>
<xs:sequence>
<xs:element ref="person" minOccurs="1" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name="unique1">
<xs:selector xpath="person"></xs:selector>
<xs:field xpath="name/given"></xs:field>
<xs:field xpath="name/family"></xs:field>
</xs:unique>
<xs:key name="empid">
<xs:selector xpath="person"></xs:selector>
<xs:field xpath="@id"></xs:field>
</xs:key>
<xs:keyref name="keyref1" refer="empid">
<xs:selector xpath="person"></xs:selector>
<xs:field xpath="link/@manager"></xs:field>
</xs:keyref>
</xs:element>
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element ref="name"></xs:element>
<xs:element ref="email" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="url" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="link" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"></xs:attribute>
<xs:attribute name="note" type="xs:string"></xs:attribute>
<xs:attribute name="contr" default="false">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="true"></xs:enumeration>
<xs:enumeration value="false"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="salary" type="xs:integer"></xs:attribute>
<xs:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="skip"></xs:anyAttribute>
</xs:complexType>
</xs:element>
<xs:element name="name">
<xs:complexType>
<xs:all>
<xs:element ref="family"></xs:element>
<xs:element ref="given"></xs:element>
</xs:all>
<xs:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="skip"></xs:anyAttribute>
</xs:complexType>
</xs:element>
<xs:element name="family">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="skip"></xs:anyAttribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="given">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="skip"></xs:anyAttribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="email" type="xs:string"></xs:element>
<xs:element name="url">
<xs:complexType>
<xs:attribute name="href" type="xs:string" default="http://"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="link">
<xs:complexType>
<xs:attribute name="manager" type="xs:IDREF"></xs:attribute>
<xs:attribute name="subordinates" type="xs:IDREFS"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:notation name="gif" public="-//APP/Photoshop/4.0" system="photoshop.exe"></xs:notation>
</xs:schema><?xml version="1.0" encoding="LATIN1"?>
<xs:schema>
<xs:import namespace="http://www.w3.org/XML/1998/namespace">
<xs:annotation>
<xs:documentation>
The schemaLocation of the relevant file is
"http://www.w3.org/2001/xml.xsd"; however,
we don't want to assume people are always
connected to the 'net when playing with this file.
</xs:documentation>
</xs:annotation>
</xs:import>
<xs:element name="personnel">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="1" ref="person"></xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name="unique1">
<xs:selector xpath="person"></xs:selector>
<xs:field xpath="name/given"></xs:field>
<xs:field xpath="name/family"></xs:field>
</xs:unique>
<xs:key name="empid">
<xs:selector xpath="person"></xs:selector>
<xs:field xpath="@id"></xs:field>
</xs:key>
<xs:keyref name="keyref1" refer="empid">
<xs:selector xpath="person"></xs:selector>
<xs:field xpath="link/@manager"></xs:field>
</xs:keyref>
</xs:element>
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element ref="name"></xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="email"></xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="url"></xs:element>
<xs:element maxOccurs="1" minOccurs="0" ref="link"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"></xs:attribute>
<xs:attribute name="note" type="xs:string"></xs:attribute>
<xs:attribute default="false" name="contr">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="true"></xs:enumeration>
<xs:enumeration value="false"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="salary" type="xs:integer"></xs:attribute>
<xs:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="skip"></xs:anyAttribute>
</xs:complexType>
</xs:element>
<xs:element name="name">
<xs:complexType>
<xs:all>
<xs:element ref="family"></xs:element>
<xs:element ref="given"></xs:element>
</xs:all>
<xs:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="skip"></xs:anyAttribute>
</xs:complexType>
</xs:element>
<xs:element name="family">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="skip"></xs:anyAttribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="given">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="skip"></xs:anyAttribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="email" type="xs:string"></xs:element>
<xs:element name="url">
<xs:complexType>
<xs:attribute default="http://" name="href" type="xs:string"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="link">
<xs:complexType>
<xs:attribute name="manager" type="xs:IDREF"></xs:attribute>
<xs:attribute name="subordinates" type="xs:IDREFS"></xs:attribute>
</xs:complexType>
</xs:element>
<xs:notation name="gif" public="-//APP/Photoshop/4.0" system="photoshop.exe"></xs:notation>
</xs:schema>
Finished parsing the memory buffer containing the following XML statements:
<?xml version='1.0' encoding='ascii'?>
<!DOCTYPE company [
<!ELEMENT company (product,category,developedAt)>
<!ELEMENT product (#PCDATA)>
<!ELEMENT category (#PCDATA)>
<!ATTLIST category idea CDATA #IMPLIED>
<!ELEMENT developedAt (#PCDATA)>
]>
<company>
<product>XML4C</product>
<category idea='great'>XML Parsing Tools</category>
<developedAt>
IBM Center for Java Technology, Silicon Valley, Cupertino, CA
</developedAt>
</company>
Parsing took{timing removed}(4 elements, 1 attributes, 16 spaces, 95 characters).
Finished parsing the memory buffer containing the following XML statements:
<?xml version='1.0' encoding='ascii'?>
<!DOCTYPE company [
<!ELEMENT company (product,category,developedAt)>
<!ELEMENT product (#PCDATA)>
<!ELEMENT category (#PCDATA)>
<!ATTLIST category idea CDATA #IMPLIED>
<!ELEMENT developedAt (#PCDATA)>
]>
<company>
<product>XML4C</product>
<category idea='great'>XML Parsing Tools</category>
<developedAt>
IBM Center for Java Technology, Silicon Valley, Cupertino, CA
</developedAt>
</company>
Parsing took{timing removed}(4 elements, 1 attributes, 0 spaces, 111 characters).
Usage:
Redirect <XML file>
This program installs an entity resolver, traps the call to
the external DTD file and redirects it to another application
specific file which contains the actual dtd.
The program then counts and reports the number of elements and
attributes in the given XML file.
personal.xml:{timing removed}(37 elems, 12 attrs, 0 spaces, 268 chars)
Usage:
This program invokes the DOMBuilder, builds the DOM tree,
and then prints the number of elements found in each XML file.
-l Indicate the input file is a List File that has a list of xml files.
Default to off (Input file is an XML file).
-v=xxx Validation scheme [always | never | auto*].
-n Enable namespace processing. Defaults to off.
-s Enable schema processing. Defaults to off.
-f Enable full schema constraint checking. Defaults to off.
-locale=ll_CC specify the locale, default: en_US.
-p Print out names of elements and attributes encountered.
-? Show this help.
* = Default if not provided explicitly.
personal.xml:{timing removed}(37 elems).
personal.xml:{timing removed}(37 elems).
personal-schema.xml:{timing removed}(37 elems).
Usage:
DOMPrint [options] <XML file>
This program invokes the DOM parser, and builds the DOM tree.
Options:
-e create entity reference nodes. Default is no expansion.
-v=xxx Validation scheme [always | never | auto*].
-n Enable namespace processing. Default is off.
-s Enable schema processing. Default is off.
-f Enable full schema constraint checking. Defaults is off.
-wenc=XXX Use a particular encoding for output. Default is
the same encoding as the input XML file. UTF-8 if
input XML file has not XML declaration.
-wfile=xxx Write to a file instead of stdout.
-wscs=xxx Enable/Disable split-cdata-sections. Default on
-wddc=xxx Enable/Disable discard-default-content. Default on
-wflt=xxx Enable/Disable filtering. Default off
-wfpp=xxx Enable/Disable format-pretty-print. Default off
-wbom=xxx Enable/Disable write Byte-Order-Mark Default off
-? Show this help.
* = Default if not provided explicitly.
The parser has intrinsic support for the following encodings:
UTF-8, USASCII, ISO8859-1, UTF-16[BL]E, UCS-4[BL]E,
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!-- @version: -->
<personnel>
<person id="Big.Boss">
<given>Big</given>
</name>
<email>chief@foo.com</email>
<link subordinates="one.worker two.worker three.worker four.worker five.worker"/>
</person>
<person id="one.worker">
<given>One</given>
</name>
<email>one@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person id="two.worker">
<given>Two</given>
</name>
<email>two@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person id="three.worker">
<given>Three</given>
</name>
<email>three@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person id="four.worker">
<given>Four</given>
</name>
<email>four@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person id="five.worker">
<given>Five</given>
</name>
<email>five@foo.com</email>
<link manager="Big.Boss"/>
</person>
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!-- @version: -->
<personnel>
<person id="Big.Boss">
<given>Big</given>
</name>
<email>chief@foo.com</email>
<link subordinates="one.worker two.worker three.worker four.worker five.worker"/>
</person>
<person id="one.worker">
<given>One</given>
</name>
<email>one@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person id="two.worker">
<given>Two</given>
</name>
<email>two@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person id="three.worker">
<given>Three</given>
</name>
<email>three@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person id="four.worker">
<given>Four</given>
</name>
<email>four@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person id="five.worker">
<given>Five</given>
</name>
<email>five@foo.com</email>
<link manager="Big.Boss"/>
</person>
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<!DOCTYPE personnel SYSTEM "personal.dtd">
<!-- @version: -->
<personnel>
<person id="Big.Boss">
<given>Big</given>
</name>
<email>chief@foo.com</email>
<link subordinates="one.worker two.worker three.worker four.worker five.worker"/>
</person>
<given>One</given>
</name>
<email>one@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person id="two.worker">
<given>Two</given>
</name>
<email>two@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person id="three.worker">
<given>Three</given>
</name>
<email>three@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person id="four.worker">
<given>Four</given>
</name>
<email>four@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person id="five.worker">
<given>Five</given>
</name>
<email>five@foo.com</email>
<link manager="Big.Boss"/>
</person>
<?proc-inst-1 'foo' ?>
<personnel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="personal.xsd">
<person contr="false" id="Big.Boss">
<name xml:base="foo/bar">
<given xml:base="car/bar">Big</given>
<?proc-inst-2 'foobar' ?>
</name>
<email>chief@foo.com</email>
<link subordinates="one.worker two.worker three.worker four.worker five.worker"/>
</person>
<person contr="false" id="one.worker" xml:base="/auto/bar">
<name xml:base="/car/foo/">
<given>One</given>
</name>
<email>one@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person contr="false" id="two.worker" xml:base="http://www.example.com/car/car">
<name xml:base="/bar/foo/">
<given>Two</given>
</name>
<email>two@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person contr="false" id="three.worker">
<given>Three</given>
</name>
<email>three@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person contr="false" id="four.worker">
<given>Four</given>
</name>
<email>four@foo.com</email>
<link manager="Big.Boss"/>
</person>
<person contr="false" id="five.worker">
<given>Five</given>
</name>
<email>five@foo.com</email>
<link manager="Big.Boss"/>
</person>
stdin:{timing removed}(37 elems, 12 attrs, 134 spaces, 134 chars)
stdin:{timing removed}(37 elems, 12 attrs, 0 spaces, 268 chars)
stdin:{timing removed}(37 elems, 29 attrs, 140 spaces, 128 chars)
Usage:
PParse [options] <XML file>
This program demonstrates the progressive parse capabilities of
the parser system. It allows you to do a scanFirst() call followed by
a loop which calls scanNext(). You can drop out when you've found what
ever it is you want. In our little test, our event handler looks for
16 new elements then sets a flag to indicate its found what it wants.
At that point, our progressive parse loop exits.
Options:
-v=xxx - Validation scheme [always | never | auto*].
-n - Enable namespace processing [default is off].
-s - Enable schema processing [default is off].
-f - Enable full schema constraint checking [default is off].
-? - Show this help.
* = Default if not provided explicitly.
personal.xml:{timing removed}(37 elems, 12 attrs, 134 spaces, 134 chars)
personal-schema.xml:{timing removed}(37 elems, 29 attrs, 140 spaces, 128 chars)
Usage:
EnumVal <XML file>
This program parses the specified XML file, then shows how to
Tinny Ng
committed
enumerate the contents of the DTD Grammar. Essentially,
shows how one can access the DTD information stored in internal
data structures.
ELEMENTS:
----------------------------
Name: personnel
Content Model: (person)+
Name: person
Content Model: (name,email*,url*,link?)
Attributes:
Name:id, Type: ID
Name: name
Content Model: (#PCDATA|family|given)*
Name: email
Name: url
Content Model: EMPTY
Attributes:
Name:href, Type: CDATA
Name: link
Content Model: EMPTY
Name:manager, Type: IDREF(S)
David Abram Cargill
committed
Name:subordinates, Type: IDREF(S)
Usage:
SEnumVal <XML file>
This program parses a file, then shows how to enumerate the
Tinny Ng
committed
contents of the Schema Grammar. Essentially, shows how one can
access the Schema information stored in internal data structures.
Name: personnel
Model Type: Children
Create Reason: Declared
ContentType:
Content Model: (person,)
--------------------------------------------
Name: person
Model Type: Children
Create Reason: Declared
ContentType:
Content Model: ((name,email,url),link)