XML-Element auslesen
Verfasst: Montag 30. September 2013, 11:50
Hallo,
ich habe folgendes XML, aus dem ich genau einen String auslesen möchte:
<?xml version="1.0" encoding="utf-8"?>
<wps:ExecuteResponse xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wp ... sponse.xsd" service="WPS" version="1.0.0" xml:lang="en-CA" serviceInstance="http://vm249.rz.uos.de/cgi-bin/wps.py?s ... sion=1.0.0" statusLocation="http://vm249.rz.uos.de/wpsoutput/pywps-138053632309.xml">
<wps:Process wps:processVersion="0.1">
<ows:Identifier>wollny_pollmueller_abschluss_2</ows:Identifier>
<ows:Title>TinReducer Aufgabe 1</ows:Title>
<ows:Abstract>reduces the points of a given triangulated irregular networkby a variable factor and returns it as GML</ows:Abstract>
</wps:Process>
<wps:Status creationTime="2013-09-30T12:18:45Z">
<wps:ProcessSucceeded>PyWPS Process wollny_pollmueller_abschluss_2 successfully calculated</wps:ProcessSucceeded>
</wps:Status>
<wps:ProcessOutputs>
<wps:Output>
<ows:Identifier>output1</ows:Identifier>
<ows:Title>computation time (to compare different approaches)</ows:Title>
<wps:Data>
<wps:LiteralData dataType="integer">2.08</wps:LiteralData>
</wps:Data>
</wps:Output>
<wps:Output>
<ows:Identifier>data_output</ows:Identifier>
<ows:Title>Output vector data</ows:Title>
<wps:Reference href="http://vm249.rz.uos.de/wpsoutput/data_o ... re1VB5.gml" mimeType="text/xml"/>
</wps:Output>
</wps:ProcessOutputs>
</wps:ExecuteResponse>
Alles was ich brauche ist der Wert von "href", also die url zum Output meines Prozesses.
Ich brauche das für eine Aufgabe, die heute Abend abgegeben werden muss und schaffe es leider nicht mehr, mich mit XML parsen
allgemein zu beschäftigen.
Ich würde mich freuen, wenn mir jemand helfen könnte!
Grüße
fPol
ich habe folgendes XML, aus dem ich genau einen String auslesen möchte:
<?xml version="1.0" encoding="utf-8"?>
<wps:ExecuteResponse xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wp ... sponse.xsd" service="WPS" version="1.0.0" xml:lang="en-CA" serviceInstance="http://vm249.rz.uos.de/cgi-bin/wps.py?s ... sion=1.0.0" statusLocation="http://vm249.rz.uos.de/wpsoutput/pywps-138053632309.xml">
<wps:Process wps:processVersion="0.1">
<ows:Identifier>wollny_pollmueller_abschluss_2</ows:Identifier>
<ows:Title>TinReducer Aufgabe 1</ows:Title>
<ows:Abstract>reduces the points of a given triangulated irregular networkby a variable factor and returns it as GML</ows:Abstract>
</wps:Process>
<wps:Status creationTime="2013-09-30T12:18:45Z">
<wps:ProcessSucceeded>PyWPS Process wollny_pollmueller_abschluss_2 successfully calculated</wps:ProcessSucceeded>
</wps:Status>
<wps:ProcessOutputs>
<wps:Output>
<ows:Identifier>output1</ows:Identifier>
<ows:Title>computation time (to compare different approaches)</ows:Title>
<wps:Data>
<wps:LiteralData dataType="integer">2.08</wps:LiteralData>
</wps:Data>
</wps:Output>
<wps:Output>
<ows:Identifier>data_output</ows:Identifier>
<ows:Title>Output vector data</ows:Title>
<wps:Reference href="http://vm249.rz.uos.de/wpsoutput/data_o ... re1VB5.gml" mimeType="text/xml"/>
</wps:Output>
</wps:ProcessOutputs>
</wps:ExecuteResponse>
Alles was ich brauche ist der Wert von "href", also die url zum Output meines Prozesses.
Ich brauche das für eine Aufgabe, die heute Abend abgegeben werden muss und schaffe es leider nicht mehr, mich mit XML parsen
allgemein zu beschäftigen.
Ich würde mich freuen, wenn mir jemand helfen könnte!
Grüße
fPol