You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2005/12/05 10:45:29 UTC

svn commit: r354034 - /webservices/axis2/trunk/c/bindings/php/axis2/tests/sample.php

Author: samisa
Date: Mon Dec  5 01:45:23 2005
New Revision: 354034

URL: http://svn.apache.org/viewcvs?rev=354034&view=rev
Log: (empty)

Added:
    webservices/axis2/trunk/c/bindings/php/axis2/tests/sample.php

Added: webservices/axis2/trunk/c/bindings/php/axis2/tests/sample.php
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/bindings/php/axis2/tests/sample.php?rev=354034&view=auto
==============================================================================
--- webservices/axis2/trunk/c/bindings/php/axis2/tests/sample.php (added)
+++ webservices/axis2/trunk/c/bindings/php/axis2/tests/sample.php Mon Dec  5 01:45:23 2005
@@ -0,0 +1,50 @@
+<?php
+$reader  = new Axis2XMLReader("much_ado.xml");
+$builder = new Axis2OMBuilder($reader);
+$doc     = new Axis2OMDocument(NULL,$builder);
+$root    = $doc->getRootElement();
+if($root)
+{
+	echo "\n\n\nlocalname \t";
+	echo $root->getLocalname();
+	$ns = $root->getNamespace();
+	echo "\n";
+	if($ns)
+	{
+		echo "uri \n";
+		echo $ns->getUri();
+		echo "\n";
+		echo $ns->getPrefix();
+		echo "\n";
+	}
+}
+
+$node = $doc->buildNext();
+do{
+	if($node == NULL)
+		break;	
+	
+	if($node->getNodeType() == AXIS2_OM_ELEMENT)
+	{
+		echo $node->getLocalname();
+		echo "\n";
+		
+	}
+	if($node->getNodeType() == AXIS2_OM_TEXT)
+	{
+		echo "text value  \t";
+		echo $node->getValue();
+		echo "\n";
+	}
+	
+	$node = $doc->buildNext();
+		
+ }while($node);
+
+$writer = new Axis2XMLWriter(NULL, 1, 0);
+$output = new Axis2OMOutput($writer);
+$root->serialize($output);
+echo "\n\n__________serialized output of xml file \n\n";
+echo $writer->getXML();
+echo "\n\n";
+?>
\ No newline at end of file