Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xml::xpath::node(3) [osx man page]

XPath::Node(3)						User Contributed Perl Documentation					    XPath::Node(3)

XML::XPath::Node - internal representation of a node API
The Node API aims to emulate DOM to some extent, however the API isn't quite compatible with DOM. This is to ease transition from XML::DOM programming to XML::XPath. Compatibility with DOM may arise once XML::DOM gets namespace support. new Creates a new node. See the sub-classes for parameters to pass to new(). getNodeType Returns one of ELEMENT_NODE, TEXT_NODE, COMMENT_NODE, ATTRIBUTE_NODE, PROCESSING_INSTRUCTION_NODE or NAMESPACE_NODE. UNKNOWN_NODE is returned if the sub-class doesn't implement getNodeType - but that means something is broken! The constants are exported by default from XML::XPath::Node. The constants have the same numeric value as the XML::DOM versions. getParentNode Returns the parent of this node, or undef if this is the root node. Note that the root node is the root node in terms of XPath - not the root element node. to_sax ( $handler | %handlers ) Generates sax calls to the handler or handlers. See the PerlSAX docs for details (not yet implemented correctly). MORE INFO
See the sub-classes for the meaning of the rest of the API: o XML::XPath::Node::Element o XML::XPath::Node::Attribute o XML::XPath::Node::Namespace o XML::XPath::Node::Text o XML::XPath::Node::Comment o XML::XPath::Node::PI perl v5.16.2 2003-01-26 XPath::Node(3)

Check Out this Related Man Page

XPath(3pm)						User Contributed Perl Documentation						XPath(3pm)

XML::DOM::XPath - Perl extension to add XPath support to XML::DOM, using XML::XPath engine SYNOPSIS
use XML::DOM::XPath; my $parser= XML::DOM::Parser->new(); my $doc = $parser->parsefile ("file.xml"); # print all HREF attributes of all CODEBASE elements # compare with the XML::DOM version to see how much easier it is to use my @nodes = $doc->findnodes( '//CODEBASE[@HREF]/@HREF'); print $_->getValue, " " foreach (@nodes); DESCRIPTION
XML::DOM::XPath allows you to use XML::XPath methods to query a DOM. This is often much easier than relying only on getElementsByTagName. It lets you use all of the XML::DOM methods. METHODS
Those methods can be applied to a whole dom object or to a node. findnodes($path) return a list of nodes found by $path. findnodes_as_string($path) return the nodes found reproduced as XML. The result is not guaranteed to be valid XML though. findvalue($path) return the concatenation of the text content of the result nodes exists($path) return true if the given path exists. matches($path) return true if the node matches the path. SEE ALSO
Copyright 2003 by Michel Rodriguez This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.8 2008-04-14 XPath(3pm)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

XML root element

Hi All Can someone please help me with this awk to search an element in a XML file with a particular value and then change the root element. Thanks & Regards Karan (9 Replies)
Discussion started by: karansachdeva
9 Replies

2. Programming

Extracting Field values for XML file

i have an input file of XML type with data like <nx-charging:additional-parameter name="NX_INTERNATIONALIZED_CLID" value="919427960829"/><nx-charging:finalStatus>RESPONSE , Not/Applicable , OK</nx-charging:finalStatus></nx-charging:process> i want to extract data such that i get the output... (3 Replies)
Discussion started by: junaid.nehvi
3 Replies

3. Shell Programming and Scripting

Insert text at line number

I wrote a script to grep for a closing XML node. Then I need it to navigate up a line and insert some XML. Then go to the next occurrance. I have this INSERT_NODE='<QUANTITATIVE NAME="'${QR_NAME}'" QUANT="1" />' GREP_FOR='</JOB>' TMP_FILE=/tmp/lineArray.$$ if ]; then continue else ... (7 Replies)
Discussion started by: J-Man
7 Replies

4. AIX

HACMP switch over

Hi I had an active passive cluster. Node A went down and all resource groups moved to Node B. Now we brought up Node A. What is the procedure to bring everything back to Node A. Node A #lssrc -a | grep cl clcomdES clcomdES 323782 active clstrmgrES cluster... (9 Replies)
Discussion started by: samsungsamsung
9 Replies

5. Shell Programming and Scripting

Bash XML Parsing using Perl XPath

I have a bash script that needs to read input from an XML file, which includes varying numbers of a certain type of child node. I want to be able to iterate through all the child nodes of a given parent. I installed the Perl XML-XPath package from Once it's installed, from bash,... (4 Replies)
Discussion started by: jfmorales
4 Replies

6. Shell Programming and Scripting

Extracting the Root Element from the XML File

Any help to extract the root element from an XML file will be appreciated. Example: test.xml <?xml version="1.0" encoding="utf-8" ?> <TestXMLMessage> <TestRec> <ID>1000</ID> </TestRec> </TestXMLMessage> Wanted to extract the TestXMLMessage. Regards, Chari (6 Replies)
Discussion started by: sree_chari
6 Replies

7. Programming

Substring between XML

Hey Everyone, Does anyone know if its possible to perform a substr on a value between an xml node i.e. <field="tmp">replace me</field> I need to be able replace the value inside the tag element with a char * thanks, Rob. (9 Replies)
Discussion started by: robfwauk
9 Replies

8. AIX

Adding a Volume Group to an HACMP Resource Group?

Hi, I have a 2 node Cluster. Which is working in active/passive mode (i.e Node#1 is running and when it goes down the Node#2 takes over) Now there's this requirement that we need a mount point say /test that should be available in active node #1 and when node #1 goes down and node#2 takes... (6 Replies)
Discussion started by: aixromeo
6 Replies

9. AIX

Perl Module (XML:DOM) dependency

Hi All, I am facing dependency on AIX :confused:.I am trying to run an script which requires PERL MODULE (XML::DOM) to be installed. Please find the attached file which shows the error i am getting (cant locate XML/ in @INC). Please let me know how to install PERL MODULE (XML::DOM) ... (3 Replies)
Discussion started by: srivatsa86
3 Replies

10. What is on Your Mind?

A simpler XML tool

We've been getting a lot of XML questions lately, and I suspect it's only going to get worse better ... Normal shell utilities just can't handle it and the "proper" solutions, do-everything perl modules or things like xmlstarlet, just make my head ache. Started coding something tonight. What... (10 Replies)
Discussion started by: Corona688
10 Replies

11. Linux

Keeping same emc sudo name in Linux

Hi, I have Suse Linux Enterprise Server 10 installed on two node ocfs2 cluster my server. Node-1 is ptdmod01 and Node-2 is ptdmod02. It is having 218 ocfs file system, which are shared among both servers. Since this is ocfs2, each disk from EMC Storage is mounted individually on file-system as... (4 Replies)
Discussion started by: solaris_1977
4 Replies

12. AIX

Deactivating HACMP without deinstall

Looking at the configuration of the cluster from clshowres it seems to be have 3 nodes but one acting as a backup. Version of HACMP is 5.2 Node A --> Node C Node B --> Node C However, looking at the current services running from clshowsrv -a, I can only see clcomd running. clstrmgrES,... (4 Replies)
Discussion started by: depam
4 Replies

13. Shell Programming and Scripting

Positional Update of XML File

Hello, I have a XML file and need to update the data for a specific XML Attribute in the file. I need a Perl or Awk command to look for <INTERCHANGE_CONTROL_NO>000000601</INTERCHANGE_CONTROL_NO> in the XML file and change the first two 0 of the value to 9. For instance ... (4 Replies)
Discussion started by: Praveenkulkarni
4 Replies

14. Programming

Integrating bash shell

Hi folks... I am working on a project where I need to have online bash bash shell integrated in my web page. I am not clear of how to do it. can any one suggest?? The UI needs to be developed in c#. (11 Replies)
Discussion started by: keerthi koneru
11 Replies

15. UNIX for Beginners Questions & Answers

Installing a Vue.js Desktop App Using Node.js and Electron

Hi, I have both VUE CLI and Node.js installed and I want to install this task board. Although I don't expect this to go fast, I'm hoping someone can help me get the task board setup and installed on my server ? (8 Replies)
Discussion started by: MaxtheCat
8 Replies