|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
java.lang.Objectorg.xml.sax.helpers.XMLReaderAdapter
public class XMLReaderAdapter
SAX2 XMLReader 를 SAX1 Parser 로서 적응시킵니다.
이 모듈은, 원시 코드, 문서 모두 공개 도메인에 놓여져 있습니다. 따라서, 내용에 관한보증은 일절 제공되지 않습니다. 상세한 것에 대하여는,http://www.saxproject.org 를 참조해 주세요.
이 클래스는, SAX 2 XMLReader
를 랩 해, SAX1 Parser
로서 동작시킵니다. XMLReader 는, http://xml.org/sax/features/namespace-prefixes 프로퍼티의 값이 true 일 때의 조건을 지원하고 있을 필요가 있습니다. 지원하고 있지 않는 경우, 구문 분석에 실패해,SAXException
가 throw 됩니다. XMLReader 가 http://xml.org/sax/features/namespaces 프로퍼티의 값이 false 일 때의 조건을 지원하고 있는 경우는, 효율을 개선하기 위해서 그것이 사용됩니다.
Parser
,
XMLReader
생성자 의 개요 | |
---|---|
XMLReaderAdapter ()
새로운 어댑터를 작성합니다. |
|
XMLReaderAdapter (XMLReader xmlReader)
새로운 어댑터를 작성합니다. |
메소드의 개요 | |
---|---|
void |
characters (char[] ch,
int start,
int length)
SAX2 의 문자 이벤트를 적응시킵니다. |
void |
endDocument ()
문서 이벤트를 종료합니다. |
void |
endElement (String uri,
String localName,
String qName)
SAX2 의 요소 종료 이벤트를 적응시킵니다. |
void |
endPrefixMapping (String prefix)
SAX2 의 전치수식자의 매핑 종료 이벤트를 적응시킵니다. |
void |
ignorableWhitespace (char[] ch,
int start,
int length)
SAX2 의 무시할 수 있는 공백 문자 이벤트를 적응시킵니다. |
void |
parse (InputSource input)
문서를 구문 분석 합니다. |
void |
parse (String systemId)
문서를 구문 분석 합니다. |
void |
processingInstruction (String target,
String data)
SAX2 의 처리 명령 이벤트를 적응시킵니다. |
void |
setDocumentHandler (DocumentHandler handler)
SAX1 문서 이벤트 핸들러를 등록합니다. |
void |
setDocumentLocator (Locator locator)
문서 locator를 설정합니다. |
void |
setDTDHandler (DTDHandler handler)
DTD 이벤트 핸들러를 등록합니다. |
void |
setEntityResolver (EntityResolver resolver)
엔티티리조르바를 등록합니다. |
void |
setErrorHandler (ErrorHandler handler)
에러 이벤트 핸들러를 등록합니다. |
void |
setLocale (Locale locale)
에러 보고를 위한 로케일을 설정합니다. |
void |
skippedEntity (String name)
SAX2 의 스킵 된 엔티티이벤트를 적응시킵니다. |
void |
startDocument ()
문서 이벤트를 개시합니다. |
void |
startElement (String uri,
String localName,
String qName,
Attributes atts)
SAX2 의 요소 개시 이벤트를 적응시킵니다. |
void |
startPrefixMapping (String prefix,
String uri)
SAX2 의 전치수식자의 매핑 개시 이벤트를 적응시킵니다. |
클래스 java.lang. Object 로부터 상속된 메소드 |
---|
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
생성자 의 상세 |
---|
public XMLReaderAdapter() throws SAXException
「org.xml.sax.driver」프로퍼티을 사용해, 짜넣는 SAX2 드라이버를 특정합니다.
SAXException
- 편입 드라이버를 인스턴스화할 수 없는 경우,
또는 org.xml.sax.driver 프로퍼티이 지정되어 있지 않다
경우public XMLReaderAdapter(XMLReader xmlReader)
SAX2 XMLReader 를 랩 하는 새로운 어댑터를 작성합니다. 이 어댑터는, XMLReader 를 SAX1 Parser 로서 기능시킵니다.
xmlReader
- 랩 하는 SAX2 XMLReader
NullPointerException
- 인수가 null 의 경우메소드의 상세 |
---|
public void setLocale(Locale locale) throws SAXException
이 메소드는, SAX2 에서는 지원되고 있지 않습니다. 이 때문에, 항상 예외를 throw 합니다.
Parser
내의 setLocale
locale
- 에러 보고의 로케일
SAXException
- 오버라이드(override) 되지 않는 경우는 throw 되는Parser.setLocale(java.util.Locale)
public void setEntityResolver(EntityResolver resolver)
Parser
내의 setEntityResolver
resolver
- 새로운 리절버Parser.setEntityResolver(org.xml.sax.EntityResolver)
public void setDTDHandler(DTDHandler handler)
Parser
내의 setDTDHandler
handler
- 새로운 DTD 이벤트 핸들러Parser.setDTDHandler(org.xml.sax.DTDHandler)
public void setDocumentHandler(DocumentHandler handler)
SAX1 문서 핸들러는 이름 공간을 지원하지 않습니다.
Parser
내의 setDocumentHandler
handler
- 새로운 SAX1 문서 이벤트 핸들러Parser.setDocumentHandler(org.xml.sax.DocumentHandler)
public void setErrorHandler(ErrorHandler handler)
Parser
내의 setErrorHandler
handler
- 새로운 에러 이벤트 핸들러Parser.setErrorHandler(org.xml.sax.ErrorHandler)
public void parse(String systemId) throws IOException , SAXException
편입 XMLReader 가 http://xml.org/sax/features/namespace-prefixes 프로퍼티을 지원하지 않는 경우, 이 메소드는 예외를 throw 합니다.
Parser
내의 parse
systemId
- 문서의 절대 URL
IOException
- 문서의 raw 컨텐츠의 read시에
문제가 발생했을 경우
SAXException
- 문서 처리시에
문제가 발생했을 경우parse(org.xml.sax.InputSource)
,
Parser.parse(java.lang.String)
public void parse(InputSource input) throws IOException , SAXException
편입 XMLReader 가 http://xml.org/sax/features/namespace-prefixes 프로퍼티을 지원하지 않는 경우, 이 메소드는 예외를 throw 합니다.
Parser
내의 parse
input
- 문서의 입력 소스
IOException
- 문서의 raw 컨텐츠의 read시에
문제가 발생했을 경우
SAXException
- 문서 처리시에
문제가 발생했을 경우parse(java.lang.String)
,
Parser.parse(org.xml.sax.InputSource)
public void setDocumentLocator(Locator locator)
ContentHandler
내의 setDocumentLocator
locator
- 문서 locatorContentHandler.setDocumentLocator(org.xml.sax.Locator)
public void startDocument() throws SAXException
ContentHandler
내의 startDocument
SAXException
- 클라이언트로 처리 예외가
발생할 가능성이 있는ContentHandler.startDocument()
public void endDocument() throws SAXException
ContentHandler
내의 endDocument
SAXException
- 클라이언트로 처리 예외가
발생할 가능성이 있는ContentHandler.endDocument()
public void startPrefixMapping(String prefix, String uri)
ContentHandler
내의 startPrefixMapping
prefix
- 매핑 되기 전치수식자uri
- 매핑처의 이름 공간 URIContentHandler.startPrefixMapping(java.lang.String, java.lang.String)
public void endPrefixMapping(String prefix)
ContentHandler
내의 endPrefixMapping
prefix
- 매핑 되기 전치수식자ContentHandler.endPrefixMapping(java.lang.String)
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
ContentHandler
내의 startElement
uri
- 이름 공간 URIlocalName
- 이름 공간의 로컬명qName
- 전치수식자 첨부의 수식명atts
- SAX2 속성
SAXException
- 클라이언트로 처리 예외가
발생할 가능성이 있는ContentHandler.endDocument()
public void endElement(String uri, String localName, String qName) throws SAXException
ContentHandler
내의 endElement
uri
- 이름 공간 URIlocalName
- 이름 공간의 로컬명qName
- 전치수식자 첨부의 수식명
SAXException
- 클라이언트로 처리 예외가
발생할 가능성이 있는ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
public void characters(char[] ch, int start, int length) throws SAXException
ContentHandler
내의 characters
ch
- 문자 배열start
- 배열내의 개시 위치length
- 사용하는 문자수
SAXException
- 클라이언트로 처리 예외가
발생할 가능성이 있는ContentHandler.characters(char[], int, int)
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ContentHandler
내의 ignorableWhitespace
ch
- 문자 배열start
- 배열내의 개시 위치length
- 사용하는 문자수
SAXException
- 클라이언트로 처리 예외가
발생할 가능성이 있는ContentHandler.ignorableWhitespace(char[], int, int)
public void processingInstruction(String target, String data) throws SAXException
ContentHandler
내의 processingInstruction
target
- 처리 명령의 타겟data
- 처리 명령을 받는 데이터
SAXException
- 클라이언트로 처리 예외가
발생할 가능성이 있는ContentHandler.processingInstruction(java.lang.String, java.lang.String)
public void skippedEntity(String name) throws SAXException
ContentHandler
내의 skippedEntity
name
- 스킵 된 엔티티의 이름
SAXException
- 서브 클래스에 의해 throw 가능ContentHandler.skippedEntity(java.lang.String)
|
JavaTM Platform Standard Ed. 6 |
|||||||||
앞의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.