Java .split() Method To Split XML Parameters
Posted
by
Buzz Lightyear
on Stack Overflow
See other posts from Stack Overflow
or by Buzz Lightyear
Published on 2012-08-30T09:34:06Z
Indexed on
2012/08/30
9:38 UTC
Read the original article
Hit count: 469
I have this line from an XML document:
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" contentScriptType="text/ecmascript" width="1024" zoomAndPan="magnify" contentStyleType="text/css" viewBox="0 0 1024 768" height="768" preserveAspectRatio="xMidYMid meet" version="1.0">
I want to be able to split it up, using the split method. For example i want to save each parameter into a String array.
So i'd like:
contentScriptType="text/ecmascript"
width="1024"
zoomAndPan="magnify"
contentStyleType="text/css"
viewBox="0 0 1024 768"
height="768"
etc etc to be saved into a string array, is there anyway to do this using the split method, or can anybody suggest an easier, more efficient way to do this?
© Stack Overflow or respective owner