On 21 Jul 2010, at 19:32, Ben Miller wrote:
> Problem:
>
> If street2 (or any other field) has no value, PHP is outputting the XML node
> as , which is producing a JS error when I try to call:
>
> ..
>
> street2 = x[i].getElementsByTagName("street2")[0].childNodes[0].nodeValue;
>
>
Hullo!
I'm having a pig of a time trying to figure this one out: I have an
XHTML document which I've loaded into a DOMDocument because I want to
add more tags to it. However, since I live in a bilingual country, I
want to get the document's xml:lang attribute so I know what language
to add my ne
Ian Williams wrote:
I have an XML document as a string $strXml, that looks a little like this:
1
Bob
Rover
2
Fred
Fido
What's the best way to grab a single value from this document? In the past
(in
VB), I have loaded the XML int
I have an XML document as a string $strXml, that looks a little like this:
1
Bob
Rover
2
Fred
Fido
What's the best way to grab a single value from this document? In the past
(in
VB), I have loaded the XML into a DOM Document, a
Hi,
Untested but it would be something like this:
0){
//Create DomDocument
ob_start();
echo '';
$buffer = ob_get_contents();
ob_end_clean();
$doc = domxml_open_mem($buffer);
//Get root node
$root = $doc->document_element();
Hi,
Friday, October 4, 2002, 10:14:31 PM, you wrote:
DÖJ> header("Content-Type: application/xml");
DÖJ> //query database records
DÖJ> $connection = mysql_connect("localhost", "user", "pass") or die("can't connect");
DÖJ> mysql_select_db("webbish");
DÖJ> $query = "SELECT id, title, artist F
0){
//Create DomDocument
$doc = new_xmldoc("1.0");
//Add root note
$root = $doc->add_root("cds");
//Iterate through result set
while(list($id, $title, $artist) = mysql_fetch_row($result)){
Sandeep Murphy wrote:
> hi,
>
> I am running PHPtriad on a win2k machine... when I run phpinfo() it
> displays " XMLACTIVE"
this means that the standart, expat based xml support ist active
>but I keep getting an error "Fatal error: Call to
> undefined function: xmldoc() in C:\apache\htd
hi,
I am running PHPtriad on a win2k machine... when I run phpinfo() it
displays " XMLACTIVE" but I keep getting an error "Fatal error: Call to
undefined function: xmldoc() in C:\apache\htdocs\example.php on line 24"
What needs to installed/configured ??
TIA,
sandeep
--
PHP General Mai
hi ;)
Recently I've been using the DOM module of php and I have
encountered a few problems. I am working on a quite advanced XML application
and I am forced to use the PHP technology.
I need to dynamically create XML documents. There's no problem with that
when i simply use this statement:
$doc =
hi ;)
Recently I've been using the DOM module of php and I have
encountered a few problems. I am working on a quite advanced XML application
and I am forced to use the PHP technology.
I need to dynamically create XML documents. There's no problem with that
when i simply use this statement:
$doc =
On Mon, Feb 05, 2001 at 02:06:13PM +0100, Thomas Brusa wrote:
> hello
> I'm trying to parse and change a loaded xml-file using the DOM module.
> I need to remove certain nodes and append new ones.
> Is it really true that you can't remove a childnode
> while working with dom.
> in perl this woul
hello
I'm trying to parse and change a loaded xml-file using the DOM module.
I need to remove certain nodes and append new ones.
Is it really true that you can't remove a childnode
while working with dom.
in perl this would look somehow like this:
$doc1->removeChild($tmpele);
$t
13 matches
Mail list logo