Changeset 2
- Timestamp:
- 06/17/05 14:34:12 (4 years ago)
- Files:
-
- trunk/src/net/schst/XJConf/Examples/Example1.java (modified) (2 diffs)
- trunk/src/net/schst/XJConf/Examples/Example2.java (modified) (2 diffs)
- trunk/src/net/schst/XJConf/Examples/Example3.java (modified) (2 diffs)
- trunk/xml/defines.xml (modified) (2 diffs)
- trunk/xml/defines2.xml (modified) (1 diff)
- trunk/xml/test3.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/net/schst/XJConf/Examples/Example1.java
r1 r2 24 24 public static void main(String[] args) { 25 25 DefinitionParser tagParser = new DefinitionParser(); 26 File defines = new File(" defines.xml");26 File defines = new File("xml/defines.xml"); 27 27 28 28 NamespaceDefinitions defs = tagParser.parse(defines); … … 33 33 conf.setTagDefinitions(defs); 34 34 35 conf.parse(" test.xml");35 conf.parse("xml/test.xml"); 36 36 37 37 String foo = (String)conf.getConfigValue("foo"); trunk/src/net/schst/XJConf/Examples/Example2.java
r1 r2 17 17 public static void main(String[] args) { 18 18 DefinitionParser tagParser = new DefinitionParser(); 19 File defines = new File(" defines2.xml");19 File defines = new File("xml/defines2.xml"); 20 20 NamespaceDefinitions defs = tagParser.parse(defines); 21 21 … … 25 25 conf.setTagDefinitions(defs); 26 26 27 conf.parse(" test2.xml");27 conf.parse("xml/test2.xml"); 28 28 29 29 Integer one = (Integer)conf.getConfigValue("one"); trunk/src/net/schst/XJConf/Examples/Example3.java
r1 r2 17 17 public static void main(String[] args) { 18 18 DefinitionParser tagParser = new DefinitionParser(); 19 File defines = new File(" defines3.xml");19 File defines = new File("xml/defines3.xml"); 20 20 NamespaceDefinitions defs = tagParser.parse(defines); 21 21 … … 29 29 conf.setTagDefinitions(defs); 30 30 31 conf.parse(" test3.xml");31 conf.parse("xml/test3.xml"); 32 32 33 33 Integer zahl = (Integer)conf.getConfigValue("zahl"); trunk/xml/defines.xml
r1 r2 2 2 <tag name="zahl" type="java.lang.Integer"/> 3 3 <tag name="foo" type="java.lang.String"/> 4 <tag name="schst" type="net.schst. xmlConfig.examples.UpperString"/>4 <tag name="schst" type="net.schst.XJConf.Examples.UpperString"/> 5 5 6 <tag name="complex" type="net.schst. xmlConfig.examples.Complex">6 <tag name="complex" type="net.schst.XJConf.Examples.Complex"> 7 7 <attribute name="color" type="java.lang.String"/> 8 8 <attribute name="size" type="java.lang.Integer"/> 9 9 </tag> 10 10 11 <tag name="color" type="net.schst. xmlConfig.examples.Color">11 <tag name="color" type="net.schst.XJConf.Examples.Color"> 12 12 <attribute name="red" type="java.lang.Integer"/> 13 13 <attribute name="green" type="java.lang.Integer"/> … … 17 17 </tag> 18 18 19 <tag name="complex2" type="net.schst. xmlConfig.examples.Complex">19 <tag name="complex2" type="net.schst.XJConf.Examples.Complex"> 20 20 <attribute name="size" type="java.lang.Integer"/> 21 21 </tag> 22 22 23 <tag name="complex3" type="net.schst. xmlConfig.examples.Complex">23 <tag name="complex3" type="net.schst.XJConf.Examples.Complex"> 24 24 <attribute name="size" type="java.lang.Integer" default="200"/> 25 25 </tag> trunk/xml/defines2.xml
r1 r2 3 3 4 4 <tag name="colors" type="java.util.ArrayList"/> 5 <tag name="color" type="net.schst. xmlConfig.examples.Color" key="__none">5 <tag name="color" type="net.schst.XJConf.Examples.Color" key="__none"> 6 6 <attribute name="red" type="java.lang.Integer"/> 7 7 <attribute name="green" type="java.lang.Integer"/> trunk/xml/test3.xml
r1 r2 3 3 4 4 <test:foo name="zahl">12</test:foo> 5 <bar:foo name="text"> Jetzt wird der Foo Tag als String verwendet...</bar:foo>5 <bar:foo name="text">Now the tag 'foo' is used as a string</bar:foo> 6 6 7 7 </configuration>
