I'm not sure I follow you. But here is an attempt at what I think you may want:
The first paragraph just reads a file into a very large array. Ideally, I would use a 6000 element array. But ksh does not guarantee that arrays that large will work. So I use a collection of arrays, each with 1000 elements. To access element 1234, I use real element 234 of array 1. Then I have a loop that reads coordinates and calculates the line number coresponding to those coordinates. Then I convert the line number to array/element and grab the value. To test it, I created a bigfile with:
yes | awk '{print NR,$0}' | sed 6000q > bigfile
Hi there all
I got the following
I got multiple arrays named for example
STAT_AAAA
STAT_AAAB
STAT_AAAC
STAT_AAAD
Now what I want I have chosen an option in a menu to select 1
but I dont want to write for all the same thing so I made it a signle one
now what I want is to get
STAT_ and... (6 Replies)
Hi,
I have a file containing details of different departments . Infomration of departments is in various tags
file is as below
I want to create a new file from the above file which should contain only two fields belonging to one department
format
There are multiple files... (1 Reply)
Hi,
Please note that as a programmer I cannot tell the file format or details of my production files so I have re-framed my file and taken a case of departments. Kindly guide as its related to a production requirement of data containing recors of production customer NOT A HOMEWORK :)
I have... (10 Replies)
Under smit, one has to manually select each fix with F7. there 9000 fixes left to be marked. How Can I manually install/Mark all of these without SMIT.
---------- Post updated at 02:29 PM ---------- Previous update was at 01:15 PM ----------
From the command line
instfix -T -d... (4 Replies)
Hello,
I want to extract all values from table except for those that contain the '*' character in the second column. I tried awk '$2!=*' and this threw a syntax error. Do I need to specify an escape character or != is valid only for numerical comparisons?
Thanks,
Guss (1 Reply)
Hi All,
i have log file sample data is
2010/10/09|04:00:00.392|15Minute|BW=0|192.168.0.1
2010/10/08|04:00:00.392|15Minute|BW=0|192.168.0.1
2010/10/07|04:00:00.392|15Minute|BW=0|192.168.0.1
2010/10/05|04:00:00.392|15Minute|BW=0|192.168.0.1
2010/10/03|04:00:00.392|15Minute|BW=0|192.168.0.1... (2 Replies)
ok im kinda stuck i have a bash script with 4 options
1. Create Script
2. Show Script
3 . Delete script
4. Exithow would i use an if statement for this? im not sure what test command i would use.
I know it would be like this (below) to display the script
if
then cat script1or for the... (10 Replies)
Hi,
I need some help taking a selection from a command and adding part of the output to an array.
I'd like to read the items into the array, have the user chose an option from the array and put the item from column 1 into a variable.
The command is:
awless -l list routetables --columns... (7 Replies)
Discussion started by: bignellrp
7 Replies
LEARN ABOUT PHP
domdocument.createelement
DOMDOCUMENT.CREATEELEMENT(3) 1 DOMDOCUMENT.CREATEELEMENT(3)DOMDocument::createElement - Create new element node
SYNOPSIS
public DOMElement DOMDocument::createElement (string $name, [string $value])
DESCRIPTION
This function creates a new instance of class DOMElement. This node will not show up in the document unless it is inserted with (e.g.)
DOMNode.appendChild(3).
PARAMETERS
o $name
- The tag name of the element.
o $value
- The value of the element. By default, an empty element will be created. The value can also be set later with DOMElement::$node-
Value.
RETURN VALUES
Returns a new instance of class DOMElement or FALSE if an error occurred.
ERRORS /EXCEPTIONS
o DOM_INVALID_CHARACTER_ERR - Raised if $name contains an invalid character.
EXAMPLES
Example #1
Creating a new element and inserting it as root
<?php
$dom = new DOMDocument('1.0', 'utf-8');
$element = $dom->createElement('test', 'This is the root element!');
// We insert the new element as root (child of the document)
$dom->appendChild($element);
echo $dom->saveXML();
?>
The above example will output:
<?xml version="1.0" encoding="utf-8"?>
<test>This is the root element!</test>
NOTES
Note
The $value will not be escaped. Use DOMDocument::createTextNode to create a text node with escaping support.
SEE ALSO
DOMNode::appendChild, DOMDocument::createAttribute, DOMDocument::createAttributeNS, DOMDocument::createCDATASection, DOMDocument::create-
Comment, DOMDocument::createDocumentFragment, DOMDocument::createElementNS, DOMDocument::createEntityReference, DOMDocument::createPro-
cessingInstruction, DOMDocument::createTextNode.
PHP Documentation Group DOMDOCUMENT.CREATEELEMENT(3)