ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/util/uk/org/iscream/cms/util/XMLStringParser.java
(Generate patch)

Comparing projects/cms/source/util/uk/org/iscream/cms/util/XMLStringParser.java (file contents):
Revision 1.7 by pjm2, Mon Jan 29 15:36:33 2001 UTC vs.
Revision 1.8 by tdb, Sat Mar 10 00:49:39 2001 UTC

# Line 6 | Line 6 | import java.io.*;
6   import java.util.ArrayList;
7  
8   import org.xml.sax.*;
9 + import org.xml.sax.helpers.*;
10   import javax.xml.parsers.SAXParserFactory;
11   import javax.xml.parsers.ParserConfigurationException;
12   import javax.xml.parsers.SAXParser;
# Line 16 | Line 17 | import javax.xml.parsers.SAXParser;
17   * @author  $Author$
18   * @version $Id$
19   */
20 < public class XMLStringParser extends HandlerBase {
20 > public class XMLStringParser extends DefaultHandler {
21  
22   //---FINAL ATTRIBUTES---
23  
# Line 73 | Line 74 | public class XMLStringParser extends HandlerBase {
74       *     "packet.attributes.machine_name"
75       * within the XMLPacket.
76       */
77 <    public void startElement (String name, AttributeList attrs) throws SAXException {
77 >    public void startElement (String name, Attributes attrs) throws SAXException {
78          indentLevel++;
79          tagList.add(name);
80          if (attrs != null) {
81              for (int i = 0; i < attrs.getLength (); i++) {
82 <                packet.addParam(getPath()+".attributes."+attrs.getName(i), attrs.getValue(i));
82 >                packet.addParam(getPath()+".attributes."+attrs.getLocalName(i), attrs.getValue(i));
83              }
84          }
85      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines