org.mmbase.util
Class XMLMMLanguageReader

java.lang.Object
  extended byorg.mmbase.util.xml.DocumentReader
      extended byorg.mmbase.util.XMLBasicReader
          extended byorg.mmbase.util.XMLMMLanguageReader

public class XMLMMLanguageReader
extends XMLBasicReader

XMLLanguageReader parses the .xml file in its argument in its constructor. This .xml file should be formatted according to mmlanguage.dtd. - getLanguageCode() - returns the language code of the .xml file - getDictionary() - returns a hashtable with mmbase term identifiers to their translations in this specific language. Uglinesses: - no check whether the input file exists - doesn't read when the xml:lang attribute is absent, but doesn't generate an error either

Version:
$Id: XMLMMLanguageReader.java,v 1.9 2004/02/09 13:50:35 pierre Exp $
Author:
cjr@dds.nl

Field Summary
 
Fields inherited from class org.mmbase.util.xml.DocumentReader
document, DTD_ERROR, DTD_ERROR_1_0, FILENOTFOUND, PUBLIC_ID_ERROR, PUBLIC_ID_ERROR_1_0
 
Constructor Summary
XMLMMLanguageReader(java.lang.String filename)
           
 
Method Summary
protected  void generateFromDOM()
          generateFromDOM() walks the DOM-tree and converts the result to a Hashtable
 java.util.Hashtable getDictionary()
           
 java.lang.String getLanguageCode()
           
static void main(java.lang.String[] argv)
          Test code:
 
Methods inherited from class org.mmbase.util.XMLBasicReader
getChildElements, getChildElements, getChildElements, getChildElements, getDocumentBuilder, getDocumentBuilder, getDocumentBuilder, getDocumentBuilder, getDocumentBuilder, getDocumentBuilder, getElementAttributeValue, getElementAttributeValue, getElementByPath, getElementByPath, getElementName, getElementValue, getElementValue
 
Methods inherited from class org.mmbase.util.xml.DocumentReader
getFileName, getNodeTextValue, registerPublicIDs, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLMMLanguageReader

public XMLMMLanguageReader(java.lang.String filename)
Method Detail

generateFromDOM

protected void generateFromDOM()
generateFromDOM() walks the DOM-tree and converts the result to a Hashtable


getLanguageCode

public java.lang.String getLanguageCode()

getDictionary

public java.util.Hashtable getDictionary()

main

public static void main(java.lang.String[] argv)
Test code:



MMBase build 1.7.4.20050922