Parse XML using the standard Java DOM parser

preview_player
Показать описание
This video shows how we can use the standard Java DOM parser to parse XML. I use JUnit "learning" tests to explore the API. There's also a short tangent about static factory methods.
Рекомендации по теме
Комментарии
Автор

Amazing tutorial man, very in-depth and very clear
thanks a lot.

medvfx
Автор

I want to write or replace the text of the text tag in the xml, can you explain how ?

aparnausa
Автор

Hi Paul, what if I want to get all the title from each tag?

madhanv
Автор

Hi Paul, what if I've XML string rather then XML File. how do I parse it and store into Maps?
for Ex:String vehicleInfo = "
<vehicle>
<car>BMW</car>
<bike>Yamaha</bike>
<truck>GMC</truck>
</vehicle>"
need to store the tag name as a Key and tag value as a Value into the map.
Thanks in advance.

moha-mantriofhousingarchit
Автор

How to handle nested xml like I have 5 reports each have 10 tags and out of 10tags have 3-4 subtags.
Eg.<report>
<Rep id =1>
<header>

</header>
<>
<>
....
</Rep>
<Rep id=2>
Same as Rep 1
I have total 5 Rep tags

chaitalivishal
Автор

Hi,

I have to convert xml files 3.01 version and into another 2.2.5 versision xml file.

Is it possible in java to make a tool for version conversion????


Thank's a lot
sd.waseem

syedwaseemahmed