내가 SAX와 해당 문서를 구문 분석하기 위해 노력하고있어 몇 가지 특성을 읽을 수 없습니다 startElement 핸들러가있는 속성이지만 scxml의 속성 목록 크기는 0입니다. 왜? 어떻게 그 문제를 극복 할 수 있습니까?는 SAX
편집 : 첫 번째 태그를 구문 분석 할 때
public void startElement(String uri, String localName, String qName, Attributes attributes){
System.out.println(attributes.getValue("initialstate"));
System.out.println(attributes.getValue("name"));
}
가 작동하지 않습니다 (인쇄 "널 (null)"두 번). 사실,
attributes.getLength();
은 0으로 평가됩니다.
감사
:
및
출력은 반갑습니다. – rochb
public void startElement (String uri, String localName, String qName, 특성 특성) { System.out.println (attributes.getValue ("initialstate"))); System.out.println (attributes.getValue ("name"))); } 첫 번째 태그가 구문 분석 될 때 작동하지 않습니다. – akappa
문서에 XML 네임 스페이스가 있습니까? – skaffman