Sponsored Content
Operating Systems HP-UX Need help for xslt transformation using Shell script Post 302397286 by fpmurphy on Sunday 21st of February 2010 06:04:03 PM
Old 02-21-2010
The 'o/p XML" you showed us is neither valid or well-formed. Without seeing a valid and well-formed XML document, we cannot help you with a transformation stylesheet.
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

file name transformation

I've got a multitude of text data files that carry exactly the same kind of data. Unfortunately some of them have a different filename format some are: 'category'_'month'-'year'_act.txt an example being: daf_Apr-1961_act.txt and some are: 'category'_ 'year'-'month'_act.txt an... (16 Replies)
Discussion started by: vrms
16 Replies

2. Shell Programming and Scripting

shell call xalan to transform xml with xslt, but can not find root node

hi experts: i am using xslt to transform xml in shell. But can not find root node of source xml, if i remove the naming space definition in source xml, it works fine. So our the question is how to let xslt know the naming space of srouce xml file? Thanks for your kindly help in... (0 Replies)
Discussion started by: summer_cherry
0 Replies

3. Shell Programming and Scripting

xslt transformation through Unix

Hi .. I have one input XML and I want to convert into another XML using parameter mapping through Database through Unix shell script. But I dont have idea how to do that. And how can I create xsl sheet if mapping is through database tables. Please help me on this. (1 Reply)
Discussion started by: srinu19
1 Replies

4. UNIX for Advanced & Expert Users

Need help in xslt transformation

Hi I have one input xml file <param name="EXTR_COL" valueDesc="AUTHD_RFLL" value="rx.AUTHD_RFLL" /> There is a mapping parameters in Database. if EXTR_COL is present in input XML then it is mapped to fieldlist. so the o/p XML looks like <fieldlist> <datasource... (1 Reply)
Discussion started by: srinu19
1 Replies

5. Shell Programming and Scripting

Data transformation

I do have an input text file of the following format with 1000's of lines input file: 3386(11:11,Ani:0,Bri:1,ch:1,Jwe:0,Jor:0,LP:0,Lo:0,NS:1,al:1,bo:0,boy:0,bru:0,sh:0,cor:1,dum:0,ery:0,mac:0,mic:0)... (3 Replies)
Discussion started by: Kanja
3 Replies
SIMPLEXML_LOAD_STRING(3)						 1						  SIMPLEXML_LOAD_STRING(3)

simplexml_load_string - Interprets a string of XML into an object

SYNOPSIS
SimpleXMLElement simplexml_load_string (string $data, [string $class_name = "SimpleXMLElement"], [int $options], [string $ns = ""], [bool $is_prefix = false]) DESCRIPTION
Takes a well-formed XML string and returns it as an object. PARAMETERS
o $data - A well-formed XML string o $class_name - You may use this optional parameter so that simplexml_load_string(3) will return an object of the specified class. That class should extend the SimpleXMLElement class. o $options - Since PHP 5.1.0 and Libxml 2.6.0, you may also use the $options parameter to specify additional Libxml parameters. o $ns - Namespace prefix or URI. o $is_prefix - TRUE if $ns is a prefix, FALSE if it's a URI; defaults to FALSE. RETURN VALUES
Returns an object of class SimpleXMLElement with properties containing the data held within the xml document, or FALSE on failure. Warning This function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE. Please read the section on Booleans for more information. Use the === operator for testing the return value of this function. ERRORS
/EXCEPTIONS Produces an E_WARNING error message for each error found in the XML data. Tip Use libxml_use_internal_errors(3) to suppress all XML errors, and libxml_get_errors(3) to iterate over them afterwards. EXAMPLES
Example #1 Interpret an XML string <?php $string = <<<XML <?xml version='1.0'?> <document> <title>Forty What?</title> <from>Joe</from> <to>Jane</to> <body> I know that's the answer -- but what's the question? </body> </document> XML; $xml = simplexml_load_string($string); print_r($xml); ?> The above example will output: SimpleXMLElement Object ( [title] => Forty What? [from] => Joe [to] => Jane [body] => I know that's the answer -- but what's the question? ) At this point, you can go about using $xml->body and such. SEE ALSO
simplexml_load_file(3), SimpleXMLElement::__construct, "Dealing with XML errors", libxml_use_internal_errors(3), "Basic SimpleXML usage". PHP Documentation Group SIMPLEXML_LOAD_STRING(3)
All times are GMT -4. The time now is 06:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy