|
NAMESOAP::Data::Builder::Element - A simple wrapper SOAP::Data Elements DESCRIPTIONThis Module provides a quick and easy way to build complex SOAP data and header structures for use with SOAP::Lite, managed by SOAP::Data::Builder. METHODSnew(autotype=>0)Constructor method for this class, it instantiates and returns the element object, taking value and attributes as named parametersmy $element = SOAP::Data::Builder::Element->new( name=> 'anExample', VALUE=> 'foo', attributes => { 'ns1:foo' => 'bar'}); optional parameters are : value, attributes, header, isMethod parent should be an element fetched using get_elem value should be a string, to add child nodes use add_elem(parent=>get_elem('name/of/parent'), .. ) attributes should be a hashref : { 'ns:foo'=> bar, .. } header should be 1 or 0 specifying whether the element should be built using SOAP::Data or SOAP::Header value()the value() method sets/gets the VALUE of the elementname()the name() method gets/sets the name of the elementfullname()the fullname() method returns the full '/' delimited name of the element'eb:foo/eb:name' would return the inner element on <eb:foo><eb:name ..> .. </eb:name></eb:foo> attributes()returns a hashref of the elements attributesremove_attribute($name)removes a named attribute - returns 1 if it existed , 0 if notset_attribute($name,$value)sets a named attributeget_attribute($name)gets a named attributeadd_elem($elem)This method adds an element as a child to another element.Accepts either a SOAP::Data::Builder::Element object or a hash of arguments to create the object Returns the added element my $child = $parent->add_elem(name=>'foo',..); or $parent->add_elem($child); get_children()returns a list of the child nodes of an elementremove_elem($name)removes the named node from the element, returns 1 if existed, 0 if notget_as_data()returns the element and its sub-nodes in SOAP::Data objects.
Visit the GSP FreeBSD Man Page Interface. |