473,618 Members | 3,170 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SimpleXML Error: Node no longer exists (using addChild())

Hi,

like the title says simplexml is giving me a "Node no longer exists"
error while using the addChild() function. Note that it's not giving
an error on the first addChild();

Can somebody help ?
code causing error:

$xml = simplexml_load_ file("../xml/books.xml");

if($xml) {

$book = $xml->books->addChild('book ');
$book->addChild('titl e',$this->myTitle); //
line 171
$book->addChild('subt itle',$this->mySubTitle);
$book->addChild('publ isher',$this->myPublisher) ;
$book->addChild('year ',$this->myYear);
$book->addChild('cove r',$this->cover);
$book->addChild('cove r_thumb',$this->cover_thumb) ; // line 176
}

xml structure:

<books>
<book>
<title></title>
<subtitle></subtitle>
<publisher></publisher>
<year></year>
<cover></cover>
<cover_thumb> </cover_thumb>
</book>
</books>

complete error:

Warning: SimpleXMLElemen t::addChild() [function.Simple XMLElement-
addChild]: Node no longer exists in C:\Program Files\XAMPP\xam pp\htdocs
\php\Book.class .php on line 171

Warning: SimpleXMLElemen t::addChild() [function.Simple XMLElement-
addChild]: Node no longer exists in C:\Program Files\XAMPP\xam pp\htdocs
\php\Book.class .php on line 172

Warning: SimpleXMLElemen t::addChild() [function.Simple XMLElement-
addChild]: Node no longer exists in C:\Program Files\XAMPP\xam pp\htdocs
\php\Book.class .php on line 173

Warning: SimpleXMLElemen t::addChild() [function.Simple XMLElement-
addChild]: Node no longer exists in C:\Program Files\XAMPP\xam pp\htdocs
\php\Book.class .php on line 174

Warning: SimpleXMLElemen t::addChild() [function.Simple XMLElement-
addChild]: Node no longer exists in C:\Program Files\XAMPP\xam pp\htdocs
\php\Book.class .php on line 175

Warning: SimpleXMLElemen t::addChild() [function.Simple XMLElement-
addChild]: Node no longer exists in C:\Program Files\XAMPP\xam pp\htdocs
\php\Book.class .php on line 176

Jan 29 '07 #1
0 2554

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3406
by: (Pete Cresswell) | last post by:
We were testing a version of our app that's been running for months with no problems and it started throwing "Object no longer exists" messages on two machines in the test environment. We tried the same test scenario on a production box: no problems. Tried them on my developer box: no problems. In each of those two cases, the PC's were connected to the same test server and *supposedly* had the same production build image on them. ...
1
1616
by: Tim Shih | last post by:
Hi, I am encountering a really subtle error which I have been trying to isolate for a while and I am still not able to find it. The problem boils down to this: I have a button which marshals two files (two images) across a remoting boundary. It does this by accessing an Access database for the filenames. If the two files actually exist, my program runs fine. However, if I remove or rename the files (so that the filename listed in the...
1
1381
by: sds50 | last post by:
Error with Select Statement using the SQLDataAdapter Wizard -------------------------------------------------------------------------------- I am needing to setup the data adapter for my SQL database for use with a web page that submits employment applications. When using the wizard I get this error: Incorrect syntax near the keyword 'FROM'. Beings that the code is generated by VB I am confused what would be incorrect. If anyone can see the...
3
3149
by: ARC | last post by:
I'm having trouble here with Access 2007 and connecting to a different database. The code below works great IF the previous back-end database connection is still present and you are trying to connect to a new location (ie: datapath variable below). However, if you remove or even rename the old database, then launch your program, the code fails on the mytable.refreshlink line with an error 3044. (Description of that error is: 'C:\pc
1
4536
by: suthakar | last post by:
Hai whenever i connect the coaxial cable(phone wire) in my pc for my internet Connection it shows a warning A system Error, Duplicate name exists on the network, due to this network problems, sometime ASP.NET browser is saying network problem and not working if any body has any solution Reply me....... Thank U......... Posted Date=6 Feb 2008
2
17876
by: Fred | last post by:
"Warning: session_start() : Node no longer exists in" the call to session_start() on my page. Seemingly, the error comes and goes. From what I've gathered, this is some bug which arises when SimpleXMLElement is used along with a session. What's the fix, if any? Thanks.
4
3346
by: AXESMI59 | last post by:
I created a query in the Access Query Builder that I modified to use with VBA Code so I could reuse it for any record I choose. The one that I created with the Access Query builder works beautifully with the hardcoded criteria. The VBA version with my criteria being set by a variable returns Error 3021. I am using a DAO Recordset and all I want to do is retrieve the data to place into a report. The Original made in the Access Query Builder:...
4
4015
by: sumit kale | last post by:
Hi, Can somebody help me resolve my problem ? I am getting error when calculating total using unbound textfiled in subform. I have a main form called purchase_register_master and a subform called purchase_register_details, In sub form i have a unbound textfield called txt_Total_Amount where in i am calculating total amount for different items purchased by giving following code in control source. ContolSource: =Sum() In my main form i...
0
1325
by: Vikram Raman | last post by:
Hi I am developing a small application for blackberry playbook. I am using flash builder burrito SDK, i could retrive data from xml,but i could not edit and delete data in xml.Can anyone send me the example to remove and edit node in xml using flash builder burrito.
0
8650
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8593
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8303
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6098
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5552
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4064
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.