Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xml_parser_create_ns(3) [php man page]

XML_PARSER_CREATE_NS(3) 						 1						   XML_PARSER_CREATE_NS(3)

xml_parser_create_ns - Create an XML parser with namespace support

SYNOPSIS
resource xml_parser_create_ns ([string $encoding], [string $separator = ":"]) DESCRIPTION
xml_parser_create_ns(3) creates a new XML parser with XML namespace support and returns a resource handle referencing it to be used by the other XML functions. PARAMETERS
o $encoding - The optional $encoding specifies the character encoding for the input/output in PHP 4. Starting from PHP 5, the input encoding is automatically detected, so that the $encoding parameter specifies only the output encoding. In PHP 4, the default output encod- ing is the same as the input charset. In PHP 5.0.0 and 5.0.1, the default output charset is ISO-8859-1, while in PHP 5.0.2 and upper is UTF-8. The supported encodings are ISO-8859-1, UTF-8 and US-ASCII. o $separator - With a namespace aware parser tag parameters passed to the various handler functions will consist of namespace and tag name sep- arated by the string specified in $separator. RETURN VALUES
Returns a resource handle for the new XML parser. SEE ALSO
xml_parser_create(3), xml_parser_free(3). PHP Documentation Group XML_PARSER_CREATE_NS(3)

Check Out this Related Man Page

XML_SET_END_NAMESPACE_DECL_HANDLER(3)					 1				     XML_SET_END_NAMESPACE_DECL_HANDLER(3)

xml_set_end_namespace_decl_handler - Set up end namespace declaration handler

SYNOPSIS
bool xml_set_end_namespace_decl_handler (resource $parser, callable $handler) DESCRIPTION
Set a handler to be called when leaving the scope of a namespace declaration. This will be called, for each namespace declaration, after the handler for the end tag of the element in which the namespace was declared. PARAMETERS
o $parser - A reference to the XML parser. o $handler -$handler is a string containing the name of a function that must exist when xml_parse(3) is called for $parser. The function named by $handler must accept two parameters, and should return an integer value. If the value returned from the handler is FALSE (which it will be if no value is returned), the XML parser will stop parsing and xml_get_error_code(3) will return XML_ERROR_EXTERNAL_ENTITY_HANDLING. handler (resource $parser, string $prefix) o $parser - The first parameter, parser, is a reference to the XML parser calling the handler. o $prefix - The prefix is a string used to reference the namespace within an XML object. If a handler function is set to an empty string, or FALSE, the handler in question is disabled. Note Instead of a function name, an array containing an object reference and a method name can also be supplied. RETURN VALUES
Returns TRUE on success or FALSE on failure. NOTES
Note This event is not supported under LibXML. SEE ALSO
xml_set_start_namespace_decl_handler(3). PHP Documentation Group XML_SET_END_NAMESPACE_DECL_HANDLER(3)
Man Page

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Not sure why not working

Hello, I am very new to UNIX and PHP. I am using the Apached on a Windows platform. I am learning PHP and I am trying to create a variable with an XML string concatenated together on multiple lines. When I run this code, I am not getting any results. I am not sure why. Here is the... (4 Replies)
Discussion started by: EddiRae
4 Replies

2. Shell Programming and Scripting

Facing problem in XML::parser module in PERL

HI, I have XML file which is having values as Spanish character (UTF-8 encoding). I am using XML::parser module but my code is not able to read those characters. I did goggling but not able to find suitable solution. Anybody please help me out. XML file having characters like: ñ I am... (1 Reply)
Discussion started by: jatanig
1 Replies

3. Shell Programming and Scripting

How to check string encoding?

I want to check if the string is WINDOWS-1251 or UTF-8 can you help me to find the string encoding??? or maybe to get URL Content-Type charset with wget? this is my function on PHP function check_utf8($str) { $len = strlen($str); for($i = 0; $i < $len; $i++){ $c =... (2 Replies)
Discussion started by: sanantonio7777
2 Replies

4. UNIX for Dummies Questions & Answers

Charsets and encoding details

Hello gurus, I would like to get deep into charset and encoding isse, also tried google it but no luck. Please see bellow My configuration $ locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8"... (1 Reply)
Discussion started by: wakatana
1 Replies

5. Shell Programming and Scripting

awk command to insert a tag in XML

Hi All, I need a help on inserting a XML tag. Actual input <var> <nam>abcd</nam> <a1>.</a1> </var> if tag <a1>.</a1> is getting missed in XML like below <var> <nam>abcd</nam> </var> i need to insert wherever it is missed after <nam> tag and before </var> tag. Could anyone... (3 Replies)
Discussion started by: mohanalakshmi
3 Replies

6. Shell Programming and Scripting

XML Parsing :

HI I want to parse below file in to two output :- Input :- ?xml version="1.0" encoding="UTF-8"?> <bulkCmConfigDataFile xmlns:un="utranNrm.xsd" <configData dnPrefix="Undefined"> <xn:SubNetwork id="ONRM_ROOT_MO_R"> <xn:MeContext id="C136"> ... (3 Replies)
Discussion started by: asavaliya
3 Replies

7. Shell Programming and Scripting

XML Parse between to tag with upper tag

Hi Guys Here is my Input : <?xml version="1.0" encoding="UTF-8"?> <xn:MeContext id="01736"> <xn:VsDataContainer id="01736"> <xn:attributes> <xn:vsDataType>vsDataMeContext</xn:vsDataType> ... (12 Replies)
Discussion started by: pareshkp
12 Replies

8. Shell Programming and Scripting

Missing information in output file

Gents, Using the following code i am able to output the information i need, but some of the strings are not complete due to the separator : used.. Kindly can u help me to get all string after the first : Example in the output file column 16 i should get 17/11/25 03:43:51:732000 but i... (8 Replies)
Discussion started by: jiam912
8 Replies

9. UNIX for Beginners Questions & Answers

Convert files to UTF-8 on AIX 7.1

Dears, I have a shell script - working perfectly on Oracle Linux - that detects the encoding (the charset to be exact) of the files in a specified directory using the "file" command (The file command outputs the charset in Linux, but doesn't do that in AIX), then if the file isn't a UTF-8 text... (4 Replies)
Discussion started by: JeanM-1
4 Replies