Esempio n. 1
0
def createNsNode(inputDoc, namespaces):
    nsNode = inputDoc.createElement("NAMESPACE")
    st = StringTokenizer(namespaces)
    while (st.hasMoreTokens()):
        token = st.nextToken().split('=')
        nsNode.setAttribute("xmlns:" + token[0], token[1])
    return nsNode;
def _get_viewbox_values(view_box_str):
    view_box_values = []
    
    st = StringTokenizer(view_box_str," ")
    while st.hasMoreTokens():
        view_box_values.append(int(st.nextToken()))  
     
    return view_box_values
Esempio n. 3
0
def _get_viewbox_values(view_box_str):
    view_box_values = []

    st = StringTokenizer(view_box_str, " ")
    while st.hasMoreTokens():
        ch = st.nextToken()
        try:
            view_box_values.append(float(ch))
        except:
            view_box_values.append(int(ch))
    return view_box_values
Esempio n. 4
0
def _get_viewbox_values(view_box_str):
    view_box_values = []

    st = StringTokenizer(view_box_str," ")
    while st.hasMoreTokens():
        ch = st.nextToken()
        try:
            view_box_values.append(float(ch))  
        except:
            view_box_values.append(int(ch))  
    return view_box_values
Esempio n. 5
0
from java.util import StringTokenizer as ST
from java.io import BufferedReader as BR ,InputStreamReader as IR 
from java.lang import System as S

string = BR(IR(S.in)).readLine()
st1 = ST(string," ")
print (st1.countTokens())
while (st1.hasMoreTokens()):
	print (st1.nextToken())