Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: NOT_FOUND_ERR in insertAfter()

by NetWallah (Abbot)
on Sep 25, 2013 at 05:34 UTC ( #1055609=note: print w/replies, xml ) Need Help??


in reply to Re^2: NOT_FOUND_ERR in insertAfter()
in thread NOT_FOUND_ERR in insertAfter()

Sorry - but your code is incorrect.

The main problem is that the output XML has the 1003 student EMBEDDED INSIDE the 1001, which I do not think is the desired result.

my code produces:

<?xml version="1.0" encoding="utf-8"?> <University> <students> <student id="1000"/> <student id="1001"/><student id="1003"/> <student id="1002"/> </students> </University>
which , I believe is what the OP wanted.

             My goal ... to kill off the slow brain cells that are holding me back from synergizing my knowledge of vertically integrated mobile platforms in local cloud-based content management system datafication.

Replies are listed 'Best First'.
Re^4: NOT_FOUND_ERR in insertAfter()
by Anonymous Monk on Sep 25, 2013 at 05:59 UTC

    I agree that your output is more desirable. I suspect that there is some version difference accounting for what we are seeing. I used your code and got the same error that the OP reported, even though, like you, I know his error was caused by using $doc instead of $ele. That is why I suggested that the OP try both your code and mine.

Re^4: NOT_FOUND_ERR in insertAfter()
by boftx (Deacon) on Sep 25, 2013 at 06:03 UTC

    Hmmm, would have helped if I had logged in before replying to you. :)

    On time, cheap, compliant with final specs. Pick two.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1055609]
help
Chatterbox?
[Discipulus]: choroba if let your company to hire Tanktalus and marioroy ... what a big fishing!
[Discipulus]: i choice prague!!
[choroba]: 1200 years is enough :-)
[marioroy]: Lady_Aleena my $ans = qx! find . -name "*.pl" -exec ls -l {} \\; !;
[Tanktalus]: My basic problem right now is that if I were willing to move, I could be back in Toronto with a pay raise. We have a number of reasons for not wanting to do that.
[marioroy]: I had to backslash the backslash inside qx.
[Tanktalus]: marioroy++ # nice catch
[Lady_Aleena]: marioroy, that makes kinda makes sense.
[Discipulus]: yes i can survive also in younger town.. but when i passed i saw many strange letters..
[Lady_Aleena]: marioroy, sorry, I am not making sense right now.

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2017-04-23 20:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.