티스토리 뷰
No grammar constraints (DTD or XML Schema) referenced in the document
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
// <!DOCTYPE xml>을 추가. 이게 공식 xsd 인 듯, 하지만 거의 대부분이 사용하지않으므로 굳이 따를 필요는 없음.
// 문서 타입 선언안해서 생기는 warning. <!DOCTYPE configuration>
Window -> Preferences -> XML -> XML Files -> Validation : Indicate when no grammar is specified의 값을 Warning -> Ignore로 변경
// 옵션으로 warning 무시
XML getfirstchild returns #text
// 빈공간때문에 인덱스가 밀림. \n 삭제.
<?xml version="1.0" standalone="yes"?>
// dtd 있을때는 standalone="no", dtd 없을때는 standalone="yes"로 설정.
Document doc = docBuilder.newDocument();
doc.setXmlStandalone(true);
// true 일때 개행처리 안되는 현상. dtd가 없어서 붙여서 출력되는 듯.
transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, "yes");
// property 추가하니 해결.
'Study' 카테고리의 다른 글
| Java(자바) JSP Oracle(오라클) Date 연동 (0) | 2022.12.30 |
|---|---|
| Glassfish(글래스피시) load balancing(로드 밸런싱) (0) | 2022.12.30 |
| Java(자바) 관련 (0) | 2022.12.29 |
| Java(자바) Terms(용어) 관련 (0) | 2022.12.29 |
| Java(자바) Error(에러) 관련 (0) | 2022.12.29 |