Sponsored Content
Full Discussion: XML in unix
Operating Systems Linux XML in unix Post 302146698 by infyanurag on Wednesday 21st of November 2007 11:22:58 PM
Old 11-22-2007
XML in unix

Can you please tell for some freeware unix based command line XML parser/tool which will check whether a particular XML corresponds to its XSD or not.

please help immediately.........
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

XML to flat file in Unix

Hello, How can I take a file in XML format and convert it to a comma separated format? Is there any scripts or programs that can do this for Unix? I tried surfing the net for such an application, but everything seems to be for Windows OS. Any help or suggestions are greatly appreciated. ... (2 Replies)
Discussion started by: oscarr
2 Replies

2. UNIX for Advanced & Expert Users

XML parsers for UNIX

Hi, I'm looking for XML parsers for UNIX! Thanks in advance Tim (1 Reply)
Discussion started by: timvant
1 Replies

3. UNIX for Dummies Questions & Answers

XML and Unix

i wanted to add a child element child2 into a below xml . <parent1> <child1></child1> </parent1> like <parent1> <child1></child1> <child2></child2> </parent1> What is the best way to do this using unix commands. I donot want to create a temp file.... cat original |... (3 Replies)
Discussion started by: sehgalniraj
3 Replies

4. UNIX for Dummies Questions & Answers

XML Translator to run in UNIX

Hello, newbie (non-techie) here. I'm a business analyst for a software company in the Bay Area. A project I just got assigned to involved researching for an enterprise version of a XML translator that will run on UNIX. I'm looking for something that won't be too costly to purchase as the... (4 Replies)
Discussion started by: Antsy
4 Replies

5. Shell Programming and Scripting

Converter XML to PDF in Unix

Does anyone know of a lightweight freeware utility that will do the following?: 1) Input an XML file and XLS file 2) Do a transform 3) Then output a pdf file for Unix Platform. Thanks Andrea (3 Replies)
Discussion started by: andrea.giovanno
3 Replies

6. Programming

xml and c programming for unix

Does anyone can tell me what is the best way to post a xml request to a web service on C. I am using expat for parsing the response, but until now i build my xml request with a bunch of strcat functions, then connect to the port and send it that way. I am wondering if there are libraries or a... (3 Replies)
Discussion started by: loquito
3 Replies

7. Shell Programming and Scripting

XML and UNix ???

Hello Everyone!!! I have a list of XML files, in different directories, the structure for which is: <Data> <Info> <a> some text </a> <b> some text </b> <c> 3000 </c> </Info> <Info> ... (2 Replies)
Discussion started by: ad23
2 Replies

8. Shell Programming and Scripting

passing an unix variable to an XML

I need help I have a unix command : VERSION=$(ls -d /vsn/v12.??.??.?? | sort | tail -1) when i do echo $VERSION, i get the exact value, i want. Now i want to use this variable and pass it to an xml. How can i do that? (1 Reply)
Discussion started by: samk
1 Replies

9. UNIX for Advanced & Expert Users

XML parsing by UNIX

Hi, I am new in shell scripting. i want to extract tag values in xml files by using shell script. my files like this: <cw: properties> <cw:std_properties> <tns: properties> <tns:name>AdminOutQueue</tns:name> <tns:type>String</tns:type> <tns:subtype>QueueName</tns:subtype> <tns:value... (25 Replies)
Discussion started by: arindam guha
25 Replies

10. Shell Programming and Scripting

Generating xml file from UNIX

i have a unix script which generates the csv file. the data in csv file is dynamic. how can i convert/move the data from csv file to xml. please suggest (1 Reply)
Discussion started by: archana25
1 Replies
SOAP::WSDL::Manual::Parser(3pm) 			User Contributed Perl Documentation			   SOAP::WSDL::Manual::Parser(3pm)

NAME
SOAP::WSDL::Manual::Parser - How SOAP::WSDL parses XML messages Which XML message does SOAP::WSDL parse ? Naturally, there are two kinds of XML documents (or messages) SOAP::WSDL has to parse: o WSDL definitions o SOAP messages There are different parser implementations available for SOAP messages and WSDL definitions. WSDL definitions parser SOAP::WSDL::Expat::WSDLParser A parser for WSDL definitions based on XML::Parser::Expat. my $parser = SOAP::WSDL::Expat::WSDLParser->new(); my $wsdl = $parser->parse_file( $filename ); The WSDL parser creates a tree of perl objects, whose root is a SOAP::WSDL::Definitions element. SOAP messages parser SOAP::WSDL::Expat::MessageParser SOAP::WSDL::Expat::MessageParser converts SOAP messages to SOAP::WSDL::XSD object trees. It uses a class resolvers for finding out which class a particular XML element should be of, and type libs containing these classes. Creating a class resolver The easiest way for creating a class resolver is to run SOAP::WSDL's generator. See wsdl2perl. The class resolver must implement a class method "get_class", which is passed a list ref of the current element's XPath (relative to Body), split by /. This method must return a class name appropriate for a XML element. A class resolver package might look like this: package ClassResolver; my %class_list = ( 'EnqueueMessage' => 'Typelib::TEnqueueMessage', 'EnqueueMessage/MMessage' => 'Typelib::TMessage', 'EnqueueMessage/MMessage/MRecipientURI' => 'SOAP::WSDL::XSD::Builtin::anyURI', 'EnqueueMessage/MMessage/MMessageContent' => 'SOAP::WSDL::XSD::Builtin::string', ); sub new { return bless {}, 'ClassResolver' }; sub get_class { my $name = join('/', @{ $_[1] }); return ($class_list{ $name }) ? $class_list{ $name } : warn "no class found for $name"; }; 1; Skipping unwanted items Sometimes there's unnecessary information transported in SOAP messages. To skip XML nodes (including all child nodes), just edit the type map for the message and set the type map entry to '__SKIP__'. In the example above, EnqueueMessage/StuffIDontNeed and all child elements are skipped. my %class_list = ( 'EnqueueMessage' => 'Typelib::TEnqueueMessage', 'EnqueueMessage/MMessage' => 'Typelib::TMessage', 'EnqueueMessage/MMessage/MRecipientURI' => 'SOAP::WSDL::XSD::Builtin::anyURI', 'EnqueueMessage/MMessage/MMessageContent' => 'SOAP::WSDL::XSD::Builtin::string', 'EnqueueMessage/StuffIDontNeed' => '__SKIP__', 'EnqueueMessage/StuffIDontNeed/Foo' => 'SOAP::WSDL::XSD::Builtin::string', 'EnqueueMessage/StuffIDontNeed/Bar' => 'SOAP::WSDL::XSD::Builtin::string', ); Note that only SOAP::WSDL::Expat::MessageParser implements skipping elements at the time of writing. Creating type lib classes Every element must have a correspondent one in the type library. Builtin types should be resolved as SOAP::WSDL::XSD::Builtin::* classes Creating a type lib is easy: Just run SOAP::WSDL's generator - it will create both a typemap and the type lib classes for a WSDL file. Sometimes it is nessecary to create type lib classes by hand - not all WSDL definitions are complete. For writing your own lib classes, see SOAP::WSDL::XSD::Typelib::Element, SOAP::WSDL::XSD::Typelib::ComplexType and SOAP::WSDL::XSD::Typelib::SimpleType. SOAP::WSDL::Expat::Message2Hash Transforms a SOAP message into a perl hash refs. Using this parser is usually triggered by calling the "outputhash" method of SOAP::WSDL, or by using SOAP::WSDL::Deserializer::Hash. Acts somewhat like XML::Simple, but faster. The following restrictions apply: o Ignores all namespaces o Ignores all attributes o Does not handle mixed content o The SOAP header is ignored OLD SAX HANDLER
Historically, SOAP::WSDL used SAX for parsing XML. The SAX handlers were implemented as XML::LibXML handlers, which also worked with XML::SAX::ParserFactory. Support for SAX and XML::LibXML in SOAP::WSDL is discontinued for the following reasons: o Speed XML::Parser::Expat is faster than XML::LibXML - at least when optimized for speed. High parsing speed is one of the key requirements for a SOAP toolkit - if XML serializing and (more important) deserializing are not fast enough, the whole toolkit is unusable. o Availability XML::Parser is more popular than XML::LibXML. o Stability XML::LibXML is based on the libxml2 library. Several versions of libxml2 are known to have specific bugs. As a workaround, there are often several versions of libxml2 installed on one system. This may lead to problems on operating systems which cannot load more than one version of a shared library simultaneously. XML::LibXML is also still under development, while XML::Parser has had time to stabilize. o SOAP::Lite uses XML::Parser SOAP::Lite uses XML::Parser if available. SOAP::WSDL should not require users to install both XML::Parser and XML::LibXML. The old SAX handler historically used in SOAP::WSDL are not included in the SOAP::WSDL package any more. However, they may be obtained from the "attic" directory in SOAP::WSDL's SVN repository at https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/attic o SOAP::WSDL::SAX::WSDLHandler This is a SAX handler for parsing WSDL files into object trees SOAP::WSDL works with. It's built as a native handler for XML::LibXML, but will also work with XML::SAX::ParserFactory. To parse a WSDL file, use one of the following variants: my $parser = XML::LibXML->new(); my $handler = SOAP::WSDL::SAX::WSDLHandler->new(); $parser->set_handler( $handler ); $parser->parse( $xml ); my $data = $handler->get_data(); my $handler = SOAP::WSDL::SAX::WSDLHandler->new({ base => 'XML::SAX::Base' }); my $parser = XML::SAX::ParserFactor->parser( Handler => $handler ); $parser->parse( $xml ); my $data = $handler->get_data(); o SOAP::WSDL::SAX::MessageHandler This is a SAX handler for parsing WSDL files into object trees SOAP::WSDL works with. It's built as a native handler for XML::LibXML, but will also work with XML::SAX::ParserFactory. Can be used for parsing both streams (chunks) and documents. LICENSE AND COPYRIGHT
Copyright 2007 Martin Kutter. This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself. AUTHOR
Martin Kutter <martin.kutter fen-net.de> REPOSITORY INFORMATION
$Rev: 391 $ $LastChangedBy: kutterma $ $Id: Parser.pod 391 2007-11-17 21:56:13Z kutterma $ $HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Manual/Parser.pod $ perl v5.10.1 2010-12-21 SOAP::WSDL::Manual::Parser(3pm)
All times are GMT -4. The time now is 10:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy