标签:http ar java for on art html amp ad
Recently I‘m dealing with a source code data mining project, and I have to use XML in it. But something confusing happens to me. So I searched on Google and finally it got clear.
In this project, I use Event Iterator API of Streaming API for XML (StaX) to parse the XML files. I found a wonderful tutorial here. It really helped me a lot, thanks Lars.
But there is one thing the tutorial missed. Since XMLEventReader works as streaming, it cannot get all data from a event by only reading once. For example, when the content of a node (data between a start element and an end element) contains <
or >
(tagged by SAX, ‘<‘ and ‘>‘ originally), by calling event.asCharacters().getData()
, only characters before these two are fetched. If you want to get them all, a loop should be used here.
标签:http ar java for on art html amp ad
原文地址:http://www.cnblogs.com/zhhailon/p/4060947.html