I found an odd misnomer/bug on PM. Take a node, view the xml of it, not formated in mozilla, but the actual XML loaded from the site. Values are stored between tags, but on PM, it seems to start with an "\n" for the values.

Here's an example of a random one. (Try it on this one too).

<?xml version="1.0" encoding="ISO-8859-1"?> <node id="108933" title="Re: Re: Re: Convenient way to track function +calls?" created="2001-08-29 22:29:46" updated=""> <type id="11"> note</type> <author id="12209"> clintp</author> <data> <field name="doctext"> That's exactly what I was suggesting. I was in a bit of a rush and yo +u noticed the figurative handwaving as I went out the door. Nice job + of interpretation. :)&lt;p&gt; You might want a wantarray thrown in there somewhere to handle functio +n calls in different contexts, if that's important.&lt;p&gt; The other suggestion I have is use the Devel::Prof module and simply c +ook the output from the dprofpp. I think that assumes you have a Per +l built for debugging though. </field> <field name="root_node"> 108838</field> <field name="parent_node"> 108849</field> </data> </node>
I pasted this verbatim.

See how the values for <field>...</field> has \n's in them? It gets parsed in with the value... so the node type is actually \nnote. For the field with name of doctext, it makes sense, as someone hit entre somewhere. Otherwise, \n's need to be filtered out of the values every time. I'm sure it's not stored in the DB like that.

Just a heads up.

Bart: God, Schmod. I want my monkey-man.

Replies are listed 'Best First'.
Re: XML bug on PM with \n's
by eric256 (Parson) on Jun 06, 2004 at 17:43 UTC

    I found this link http://www.w3.org/XML/Datamodel.html which isn't a specification but its on the w3.org website so i'll take it as gospel until someone finds a document that says otherwise. If you load that up and scroll down the page he has a blurb on when newlines can be included for a humans sake and the computer is going to ignore them. The two places are immediatly preceding a tag and immediatly following a tag. So those cases above, though they look strange and I aggree they should probably be changed, are completely legal.

    Yea my 200th post! Hurrah. I was hoping for something more stunning, guess i'll have to plan my 300th more carefully :).


    ___________
    Eric Hodges
      That's fine and all.. but the new lines in this case actually make it harder to read. ;)

      Bart: God, Schmod. I want my monkey-man.

Re: XML bug on PM with \n's
by demerphq (Chancellor) on Jun 07, 2004 at 09:54 UTC

    This annoyed me as well when using various XML tools with the PM tickers. I believe the motivation was to make it easier to parse the XML with regexes. A motivation that im not sure is sound. I have the XML tickers (specifcially with you in mind) on my personal TODO list, but I've only got so many tuits to pass around. Any pmdever who desires to look into it should speak up if they are interested.


    ---
    demerphq

      First they ignore you, then they laugh at you, then they fight you, then you win.
      -- Gandhi