The "replaceAll" method of the String Class can't work, if a "?" character is in the value of an att

Discussion in 'XML' started by Ed, Sep 13, 2007.

  1. Ed

    Ed Guest

    Hi All,

    The sample code below doesn't work, but if you take out the Question
    Mark character, "?" in front of the value "Print" of the "action"
    attribute, it does work!

    Does anyone here know an other workaround? Thanks in advance!


    ////////////////////////////////////////////////////////////Sample
    code ////////////////////////////////////////////////////////
    public class Questionmark_TEST{

    public Questionmark_TEST(){}


    public static void main(String [] args){


    String XMLString="<?xml version=\"1.0\" encoding=\"UTF-8\"?
    ><categories><NodeOne action='Print?'/></categories>" ;


    String OldNode = "<NodeOne action='Print?'/>";
    String NewNode = "<NodeOne action='Print?'>empty</NodeOne>";


    XMLString = XMLString.replaceAll(OldNode,NewNode);
    System.out.println("new XMLString : "+XMLString.toString());

    }

    }
    //////////////////////////////////////////Sample
    code ///////////////////////////////////////////////////////////////////////////////////////////////
     
    Ed, Sep 13, 2007
    #1
    1. Advertising

  2. Ed

    Ed Guest

    Hi All,

    The sample code below doesn't work, but if you take out the Question
    Mark character, "?" in front of the value "Print" of the "action"
    attribute, it does work!


    Does anyone here know an other workaround? Thanks in advance!





    ///////////Sample code //////////////////

    public class Questionmark_TEST{


    public Questionmark_TEST(){}


    public static void main(String [] args){


    String XMLString="<?xml version=\"1.0\" encoding=\"UTF-8\"?



    ><categories><NodeOne action='Print?'/></categories>" ;



    String OldNode = "<NodeOne action='Print?'/>";
    String NewNode = "<NodeOne action='Print?'>empty</NodeOne>";

    XMLString = XMLString.replaceAll(OldNode,NewNode);
    System.out.println("new XMLString : "+XMLString.toString());



    }
    }

    ///////Sample code /////////////////
     
    Ed, Sep 13, 2007
    #2
    1. Advertising

  3. * Ed wrote in comp.text.xml:
    >The sample code below doesn't work, but if you take out the Question
    >Mark character, "?" in front of the value "Print" of the "action"
    >attribute, it does work!


    This is not a XML question at all, you should ask in a group that deals
    with your programming language or framework instead. You don't even say
    what language you are using, but guessing it's Java, then you have to
    escape the question mark as the first parameter is a regular expression
    as reading the documentation would tell you.
    --
    Björn Höhrmann · mailto: · http://bjoern.hoehrmann.de
    Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
    68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
     
    Bjoern Hoehrmann, Sep 13, 2007
    #3
  4. Ed

    Lew Guest

    Re: The "replaceAll" method of the String Class can't work, if a"?" character is in the value of an attribute of a XMLString!

    Ed wrote:
    > The sample code below doesn't work, but if you take out the Question
    > Mark character, "?" in front of the value "Print" of the "action"
    > attribute, it does work!
    >
    > Does anyone here know an other workaround? Thanks in advance!


    You need to watch where line breaks go in source posts to Usenet. You got a
    stray greater-than character ('>', a.k.a., "right angle bracket") that
    belonged with the xml PI, but was somehow moved to a different line.

    Also, the variable "XMLString", being a variable, should start with a
    lower-case letter, by convention.

    > public class Questionmark_TEST{
    > public Questionmark_TEST(){}
    >
    > public static void main(String [] args){
    > String XMLString =
    > "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"

    +
    > "<categories><NodeOne action='Print?'/></categories>";
    >
    > String OldNode = "<NodeOne action='Print?'/>";
    > String NewNode = "<NodeOne action='Print?'>empty</NodeOne>";
    >
    > XMLString = XMLString.replaceAll(OldNode,NewNode);
    > System.out.println("new XMLString : "+XMLString.toString());
    > }
    > }


    Did you read the Javadocs on the replaceAll() method?
    <http://java.sun.com/javase/6/docs/api/java/lang/String.html#replaceAll(java.lang.String,%20java.lang.String)>

    The first argument is a regular expression, in which the question mark has
    special significance.

    --
    Lew
     
    Lew, Sep 13, 2007
    #4
  5. Ed

    Ed Guest

    On Sep 12, 11:35 pm, Lew <> wrote:
    > Ed wrote:
    > > The sample code below doesn't work, but if you take out the Question
    > > Mark character, "?" in front of the value "Print" of the "action"
    > > attribute, it does work!

    >
    > > Does anyone here know an other workaround? Thanks in advance!

    >
    > You need to watch where line breaks go in source posts to Usenet. You got a
    > stray greater-than character ('>', a.k.a., "right angle bracket") that
    > belonged with the xml PI, but was somehow moved to a different line.


    Come on, dude! Are you so stupid, to not understand that the code
    works, and you may need to move the bracket, where it supposes to be,
    when running it!

    >
    > Also, the variable "XMLString", being a variable, should start with a
    > lower-case letter, by convention.


    Where did you get that rule, Mr. Conformist!
    Don't lecture to anyone here, your nonsense rule! Try to think out of
    the box sometime!


    > > public class Questionmark_TEST{
    > > public Questionmark_TEST(){}

    >
    > > public static void main(String [] args){
    > > String XMLString =
    > > "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"

    > +
    > > "<categories><NodeOne action='Print?'/></categories>";

    >
    > > String OldNode = "<NodeOne action='Print?'/>";
    > > String NewNode = "<NodeOne action='Print?'>empty</NodeOne>";

    >
    > > XMLString = XMLString.replaceAll(OldNode,NewNode);
    > > System.out.println("new XMLString : "+XMLString.toString());
    > > }
    > > }

    >
    > Did you read the Javadocs on the replaceAll() method?
    > <http://java.sun.com/javase/6/docs/api/java/lang/String.html#replaceAl...)>
    >
    > The first argument is a regular expression, in which the question mark has
    > special significance.
    >


    But you never answered my question though! Take a look what Roedy
    replied to me! That's kind of an answer, I was looking for!
     
    Ed, Sep 13, 2007
    #5
  6. Ed

    kcwong Guest

    On Sep 13, 3:27 pm, Ed <> wrote:
    > On Sep 12, 11:35 pm, Lew <> wrote:
    >
    > > Ed wrote:
    > > > The sample code below doesn't work, but if you take out the Question
    > > > Mark character, "?" in front of the value "Print" of the "action"
    > > > attribute, it does work!

    >
    > > > Does anyone here know an other workaround? Thanks in advance!

    >
    > > You need to watch where line breaks go in source posts to Usenet. You got a
    > > stray greater-than character ('>', a.k.a., "right angle bracket") that
    > > belonged with the xml PI, but was somehow moved to a different line.

    >
    > Come on, dude! Are you so stupid, to not understand that the code
    > works, and you may need to move the bracket, where it supposes to be,
    > when running it!
    >
    >
    >
    > > Also, the variable "XMLString", being a variable, should start with a
    > > lower-case letter, by convention.

    >
    > Where did you get that rule, Mr. Conformist!
    > Don't lecture to anyone here, your nonsense rule! Try to think out of
    > the box sometime!
    >
    >
    >
    > > > public class Questionmark_TEST{
    > > > public Questionmark_TEST(){}

    >
    > > > public static void main(String [] args){
    > > > String XMLString =
    > > > "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"

    > > +
    > > > "<categories><NodeOne action='Print?'/></categories>";

    >
    > > > String OldNode = "<NodeOne action='Print?'/>";
    > > > String NewNode = "<NodeOne action='Print?'>empty</NodeOne>";

    >
    > > > XMLString = XMLString.replaceAll(OldNode,NewNode);
    > > > System.out.println("new XMLString : "+XMLString.toString());
    > > > }
    > > > }

    >
    > > Did you read the Javadocs on the replaceAll() method?
    > > <http://java.sun.com/javase/6/docs/api/java/lang/String.html#replaceAl...)>

    >
    > > The first argument is a regular expression, in which the question mark has
    > > special significance.

    >
    > But you never answered my question though! Take a look what Roedy
    > replied to me! That's kind of an answer, I was looking for!


    Tsk.

    Lew's reply contain the same information as Roedy's post. To be fair,
    Lew's reply contains *more* information than Roedy's. Lew notified
    you, politely, about the use of regular expression in
    String.replaceAll(), netiquette of using usenet, and globally accepted
    Java coding convention, while Roedy simply pointed you to what you
    need without much explanation (nothing wrong with Roedy's answer...
    but you won't really learn why unless you act by going to his site and
    read).

    And you chose to thank Roedy and spit in Lew's face.
     
    kcwong, Sep 13, 2007
    #6
  7. Ed

    Ed Guest

    On Sep 13, 2:08 am, kcwong <> wrote:
    > On Sep 13, 3:27 pm, Ed <> wrote:
    >
    >
    >
    >
    >
    > > On Sep 12, 11:35 pm, Lew <> wrote:

    >
    > > > Ed wrote:
    > > > > The sample code below doesn't work, but if you take out the Question
    > > > > Mark character, "?" in front of the value "Print" of the "action"
    > > > > attribute, it does work!

    >
    > > > > Does anyone here know an other workaround? Thanks in advance!

    >
    > > > You need to watch where line breaks go in source posts to Usenet. You got a
    > > > stray greater-than character ('>', a.k.a., "right angle bracket") that
    > > > belonged with the xml PI, but was somehow moved to a different line.

    >
    > > Come on, dude! Are you so stupid, to not understand that the code
    > > works, and you may need to move the bracket, where it supposes to be,
    > > when running it!

    >
    > > > Also, the variable "XMLString", being a variable, should start with a
    > > > lower-case letter, by convention.

    >
    > > Where did you get that rule, Mr. Conformist!
    > > Don't lecture to anyone here, your nonsense rule! Try to think out of
    > > the box sometime!

    >
    > > > > public class Questionmark_TEST{
    > > > > public Questionmark_TEST(){}

    >
    > > > > public static void main(String [] args){
    > > > > String XMLString =
    > > > > "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
    > > > +
    > > > > "<categories><NodeOne action='Print?'/></categories>";

    >
    > > > > String OldNode = "<NodeOne action='Print?'/>";
    > > > > String NewNode = "<NodeOne action='Print?'>empty</NodeOne>";

    >
    > > > > XMLString = XMLString.replaceAll(OldNode,NewNode);
    > > > > System.out.println("new XMLString : "+XMLString.toString());
    > > > > }
    > > > > }

    >
    > > > Did you read the Javadocs on the replaceAll() method?
    > > > <http://java.sun.com/javase/6/docs/api/java/lang/String.html#replaceAl...)>

    >
    > > > The first argument is a regular expression, in which the question mark has
    > > > special significance.

    >
    > > But you never answered my question though! Take a look what Roedy
    > > replied to me! That's kind of an answer, I was looking for!

    >
    > Tsk.
    >
    > Lew's reply contain the same information as Roedy's post.


    According to you?!?


    > To be fair,
    > Lew's reply contains *more* information than Roedy's.


    I don't need more info! If I need more info, I could have spent hours
    surfing the internet, and reading all about the String class and the
    XML specification.
    I am not a Student and don't have a time, I am a Programmer, and
    wanted to resolve my current task!

    > Lew notified
    > you, politely, about the use of regular expression in
    > String.


    Nope, he was not polite! But Roedy was polite, the other guy was kind
    of arrogant, and stupid conformist!


    > replaceAll(), netiquette of using usenet, and globally accepted
    > Java coding convention,


    Globally accepted java coding convention?!?!? Sometimes, you need to
    break stupid nonsense rules!
    I am a Programmer and I care less of those little nonsense rules which
    are not that big deal at all to me, and to anyone who is not too much
    conformist!

    > while Roedy simply pointed you to what you
    > need without much explanation (nothing wrong with Roedy's answer...
    > but you won't really learn why unless you act by going to his site and
    > read).


    No, Roedy explained intelligently, in a few words, what replaceAll
    method is all about, and the other guy, fucking mine as he is, he just
    started tell
    me the code I copied and pasted did not end with a bracket and the
    bracked was on the next line! What a stupid and arrogant answer! And
    he went on, pasting a link and telling me to read the link, and spend
    hours reading all those shit, while I don't have even enough time, to
    finish my current task!


    >
    > And you chose to thank Roedy and spit in Lew's face.- Hide quoted text -
    >
    > - Show quoted text -
     
    Ed, Sep 13, 2007
    #7
  8. Ed

    Nigel Wade Guest

    Ed wrote:

    > On Sep 13, 2:08 am, kcwong <> wrote:
    >> On Sep 13, 3:27 pm, Ed <> wrote:
    >>
    >>
    >>
    >>
    >>
    >> > On Sep 12, 11:35 pm, Lew <> wrote:

    >>
    >> > > Ed wrote:
    >> > > > The sample code below doesn't work, but if you take out the Question
    >> > > > Mark character, "?" in front of the value "Print" of the "action"
    >> > > > attribute, it does work!

    >>
    >> > > > Does anyone here know an other workaround? Thanks in advance!

    >>
    >> > > You need to watch where line breaks go in source posts to Usenet. You

    got a
    >> > > stray greater-than character ('>', a.k.a., "right angle bracket") that
    >> > > belonged with the xml PI, but was somehow moved to a different line.

    >>
    >> > Come on, dude! Are you so stupid, to not understand that the code
    >> > works, and you may need to move the bracket, where it supposes to be,
    >> > when running it!

    >>
    >> > > Also, the variable "XMLString", being a variable, should start with a
    >> > > lower-case letter, by convention.

    >>
    >> > Where did you get that rule, Mr. Conformist!
    >> > Don't lecture to anyone here, your nonsense rule! Try to think out of
    >> > the box sometime!

    >>
    >> > > > public class Questionmark_TEST{
    >> > > > public Questionmark_TEST(){}

    >>
    >> > > > public static void main(String [] args){
    >> > > > String XMLString =
    >> > > > "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
    >> > > +
    >> > > > "<categories><NodeOne action='Print?'/></categories>";

    >>
    >> > > > String OldNode = "<NodeOne action='Print?'/>";
    >> > > > String NewNode = "<NodeOne action='Print?'>empty</NodeOne>";

    >>
    >> > > > XMLString = XMLString.replaceAll(OldNode,NewNode);
    >> > > > System.out.println("new XMLString : "+XMLString.toString());
    >> > > > }
    >> > > > }

    >>
    >> > > Did you read the Javadocs on the replaceAll() method?
    >> > >

    <http://java.sun.com/javase/6/docs/api/java/lang/String.html#replaceAl...)>
    >>
    >> > > The first argument is a regular expression, in which the question mark

    has
    >> > > special significance.

    >>
    >> > But you never answered my question though! Take a look what Roedy
    >> > replied to me! That's kind of an answer, I was looking for!

    >>
    >> Tsk.
    >>
    >> Lew's reply contain the same information as Roedy's post.

    >
    > According to you?!?


    and me.

    >
    >
    >> To be fair,
    >> Lew's reply contains *more* information than Roedy's.

    >
    > I don't need more info! If I need more info, I could have spent hours
    > surfing the internet, and reading all about the String class and the
    > XML specification.


    So, you're lazy and can't be bothered to do the necessary research yourself. You
    come to Usenet, ask a poorly worded question and when you get politely
    corrected you become offensive. You are Twisted AICMFP.

    That really is not the way to behave if you with to get help in future.

    > I am not a Student and don't have a time, I am a Programmer, and
    > wanted to resolve my current task!


    You're a programmer? Really?

    and you think we should use our time to help lazy people who can't be bothered
    to help themselves?

    >
    >> Lew notified
    >> you, politely, about the use of regular expression in
    >> String.

    >
    > Nope, he was not polite! But Roedy was polite, the other guy was kind
    > of arrogant, and stupid conformist!


    Yes he was polite. But you can't see that.

    >
    >
    >> replaceAll(), netiquette of using usenet, and globally accepted
    >> Java coding convention,

    >
    > Globally accepted java coding convention?!?!? Sometimes, you need to
    > break stupid nonsense rules!


    Fine, be stupid and break the "stupid" rules. Don't expect any help here.

    > I am a Programmer and I care less of those little nonsense rules which
    > are not that big deal at all to me, and to anyone who is not too much
    > conformist!


    I doubt very much you really are a programmer. Maybe a programmer wannabe, but
    if you really were a programmer those "little nonsense rules" would be quite
    important to you.

    >
    >> while Roedy simply pointed you to what you
    >> need without much explanation (nothing wrong with Roedy's answer...
    >> but you won't really learn why unless you act by going to his site and
    >> read).

    >
    > No, Roedy explained intelligently, in a few words, what replaceAll
    > method is all about, and the other guy, fucking mine as he is, he just
    > started tell
    > me the code I copied and pasted did not end with a bracket and the
    > bracked was on the next line! What a stupid and arrogant answer! And
    > he went on, pasting a link and telling me to read the link, and spend
    > hours reading all those shit, while I don't have even enough time, to
    > finish my current task!


    So, once again you tell us how lazy you are, and expect that we should do your
    work for you.

    I think not.

    --
    Nigel Wade, System Administrator, Space Plasma Physics Group,
    University of Leicester, Leicester, LE1 7RH, UK
    E-mail :
    Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
     
    Nigel Wade, Sep 13, 2007
    #8
  9. Re: The "replaceAll" method of the String Class can't work, if a"?" character is in the value of an attribute of a XMLString!

    Quick reminder to all: This is a good time to review
    http://catb.org/~esr/faqs/smart-questions.html
    .... and to remember that when someone's getting excessively angry,
    arguing with them is generally not going to improve matters.

    (Killing the thread.)

    --
    () ASCII Ribbon Campaign | Joe Kesselman
    /\ Stamp out HTML e-mail! | System architexture and kinetic poetry
     
    Joe Kesselman, Sep 13, 2007
    #9
  10. Re: The "replaceAll" method of the String Class can't work, if a"?" character is in the value of an attribute of a XMLString!

    Ed wrote:
    > On Sep 12, 11:35 pm, Lew <> wrote:
    >> Also, the variable "XMLString", being a variable, should start with a
    >> lower-case letter, by convention.

    >
    > Where did you get that rule, Mr. Conformist!


    From Sun's Java Coding Convention, which you should study.

    Arne
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Sep 14, 2007
    #10
  11. Re: The "replaceAll" method of the String Class can't work, if a"?" character is in the value of an attribute of a XMLString!

    Ed wrote:
    > On Sep 13, 2:08 am, kcwong <> wrote:
    >> To be fair,
    >> Lew's reply contains *more* information than Roedy's.

    >
    > I don't need more info! If I need more info, I could have spent hours
    > surfing the internet, and reading all about the String class and the
    > XML specification.
    > I am not a Student and don't have a time, I am a Programmer, and
    > wanted to resolve my current task!


    Why ?

    If you are not able to lookup some methods in the Java API docs
    quicker than posting to usenet, then there are no point in
    writing any code - the result should go directly to the trash bin.

    Arne
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Sep 14, 2007
    #11
  12. Ed

    Ed Guest

    On Sep 13, 5:11 pm, Arne Vajhøj <> wrote:
    > Ed wrote:
    > > On Sep 12, 11:35 pm, Lew <> wrote:
    > >> Also, the variable "XMLString", being a variable, should start with a
    > >> lower-case letter, by convention.

    >
    > > Where did you get that rule, Mr. Conformist!

    >
    > From Sun's Java Coding Convention, which you should study.
    >
    > Arne


    I know that, I can study it, but I don't have to follow some of the
    nonsense rules which may be in it! Arne, you don't have to always be a
    follower, sometimes, you need to act as aa leader and not fucking
    conformist!
    Now, you wonder why linux is a much better OS than any other!
     
    Ed, Sep 14, 2007
    #12
  13. Ed

    Ed Guest

    On Sep 13, 5:14 pm, Arne Vajhøj <> wrote:
    > Ed wrote:
    > > On Sep 13, 2:08 am, kcwong <> wrote:
    > >> To be fair,
    > >> Lew's reply contains *more* information than Roedy's.

    >
    > > I don't need more info! If I need more info, I could have spent hours
    > > surfing the internet, and reading all about the String class and the
    > > XML specification.
    > > I am not a Student and don't have a time, I am a Programmer, and
    > > wanted to resolve my current task!

    >
    > Why ?
    >
    > If you are not able to lookup some methods in the Java API docs
    > quicker than posting to usenet, then there are no point in
    > writing any code - the result should go directly to the trash bin.
    >
    > Arne


    That is your opinion, jackass!
     
    Ed, Sep 14, 2007
    #13
  14. Ed

    Daniel Pitts Guest

    On Sep 13, 2:54 am, Ed <> wrote:
    > On Sep 13, 2:08 am, kcwong <> wrote:
    >
    >
    >
    > > On Sep 13, 3:27 pm, Ed <> wrote:

    >
    > > > On Sep 12, 11:35 pm, Lew <> wrote:

    >
    > > > > Ed wrote:
    > > > > > The sample code below doesn't work, but if you take out the Question
    > > > > > Mark character, "?" in front of the value "Print" of the "action"
    > > > > > attribute, it does work!

    >
    > > > > > Does anyone here know an other workaround? Thanks in advance!

    >
    > > > > You need to watch where line breaks go in source posts to Usenet. You got a
    > > > > stray greater-than character ('>', a.k.a., "right angle bracket") that
    > > > > belonged with the xml PI, but was somehow moved to a different line.

    >
    > > > Come on, dude! Are you so stupid, to not understand that the code
    > > > works, and you may need to move the bracket, where it supposes to be,
    > > > when running it!

    >
    > > > > Also, the variable "XMLString", being a variable, should start with a
    > > > > lower-case letter, by convention.

    >
    > > > Where did you get that rule, Mr. Conformist!
    > > > Don't lecture to anyone here, your nonsense rule! Try to think out of
    > > > the box sometime!

    >
    > > > > > public class Questionmark_TEST{
    > > > > > public Questionmark_TEST(){}

    >
    > > > > > public static void main(String [] args){
    > > > > > String XMLString =
    > > > > > "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
    > > > > +
    > > > > > "<categories><NodeOne action='Print?'/></categories>";

    >
    > > > > > String OldNode = "<NodeOne action='Print?'/>";
    > > > > > String NewNode = "<NodeOne action='Print?'>empty</NodeOne>";

    >
    > > > > > XMLString = XMLString.replaceAll(OldNode,NewNode);
    > > > > > System.out.println("new XMLString : "+XMLString.toString());
    > > > > > }
    > > > > > }

    >
    > > > > Did you read the Javadocs on the replaceAll() method?
    > > > > <http://java.sun.com/javase/6/docs/api/java/lang/String.html#replaceAl...)>

    >
    > > > > The first argument is a regular expression, in which the question mark has
    > > > > special significance.

    >
    > > > But you never answered my question though! Take a look what Roedy
    > > > replied to me! That's kind of an answer, I was looking for!

    >
    > > Tsk.

    >
    > > Lew's reply contain the same information as Roedy's post.

    >
    > According to you?!?
    >
    > > To be fair,
    > > Lew's reply contains *more* information than Roedy's.

    >
    > I don't need more info! If I need more info, I could have spent hours
    > surfing the internet, and reading all about the String class and the
    > XML specification.
    > I am not a Student and don't have a time, I am a Programmer, and
    > wanted to resolve my current task!


    Would you go to a doctor that said they didn't have time to study
    medicine before treating you? You are not a programmer.

    >
    > > Lew notified
    > > you, politely, about the use of regular expression in
    > > String.

    >
    > Nope, he was not polite! But Roedy was polite, the other guy was kind
    > of arrogant, and stupid conformist!
    >

    Actually, its more than just conformity, there is a real reason to do
    that. When I first saw your code snippet, I assumed you were using
    proper convention, so I thought that XMLString was a class that I
    didn't know about, so wasn't sure that XMLString.replaceAll used
    regex, even though I know xmlString.replaceAll probably would.

    > > replaceAll(), netiquette of using usenet, and globally accepted
    > > Java coding convention,

    >
    > Globally accepted java coding convention?!?!? Sometimes, you need to
    > break stupid nonsense rules!
    > I am a Programmer and I care less of those little nonsense rules which
    > are not that big deal at all to me, and to anyone who is not too much
    > conformist!

    Again, you are not a programmer, you are at this point a troll. If
    you keep up the flaming any longer, I'd also consider you an idiot
    (although, you don't yet have that distinction).

    Would you call a carpenter a conformist because he used "standard"
    tools and measurements? It amounts to the same thing, it makes it
    easier to communicate if everyone's speaking the same language.
    >
    > > while Roedy simply pointed you to what you
    > > need without much explanation (nothing wrong with Roedy's answer...
    > > but you won't really learn why unless you act by going to his site and
    > > read).

    >
    > No, Roedy explained intelligently, in a few words, what replaceAll
    > method is all about, and the other guy, fucking mine as he is, he just
    > started tell
    > me the code I copied and pasted did not end with a bracket and the
    > bracked was on the next line! What a stupid and arrogant answer! And
    > he went on, pasting a link and telling me to read the link, and spend
    > hours reading all those shit, while I don't have even enough time, to
    > finish my current task!

    You're current task is never more important than learning to improve
    your performance on the next 10 tasks.

    Also, apparently your current task isn't that high a priority, since
    you're spending so much time trolling.
    >
     
    Daniel Pitts, Sep 14, 2007
    #14
  15. Ed

    Daniel Pitts Guest

    On Sep 13, 9:07 pm, Ed <> wrote:
    > On Sep 13, 5:11 pm, Arne Vajhøj <> wrote:
    >
    > > Ed wrote:
    > > > On Sep 12, 11:35 pm, Lew <> wrote:
    > > >> Also, the variable "XMLString", being a variable, should start with a
    > > >> lower-case letter, by convention.

    >
    > > > Where did you get that rule, Mr. Conformist!

    >
    > > From Sun's Java Coding Convention, which you should study.

    >
    > > Arne

    >
    > I know that, I can study it, but I don't have to follow some of the
    > nonsense rules which may be in it! Arne, you don't have to always be a
    > follower, sometimes, you need to act as aa leader and not fucking
    > conformist!
    > Now, you wonder why linux is a much better OS than any other!

    What's with calling people a conformist?

    Linux is a better OS because the designer and architect decided on
    good coding style, where as Microsoft decided to do it their own way
    despite an existing convention.

    I agree that *blindly* following rules can be a bad thing. Some rules
    DO have a reason behind them, and naming conventions tend to help one
    programmer understand the code written by another.

    Remember, you're writing the source code for a human, not the
    computer. The computer could understand terribly obfuscated code, and
    it couldn't care less. You, on the other hand, would be able to
    debug, edit, and improve code which was clear and followed a
    convention you already understand.

    This is especially true when you ask for help. If aren't able to
    communicate what you want, then people aren't going to be able to get
    it to you.

    I hereby strip you of your "Programmer" title, and deem you a
    "Trolling Liar".

    You're a Liar, because you claim to be a programmer, but obviously
    know nothing of the art and science of programming.
     
    Daniel Pitts, Sep 14, 2007
    #15
  16. Ed

    Ed Guest

    On Sep 13, 9:21 pm, Daniel Pitts <> wrote:
    > On Sep 13, 2:54 am, Ed <> wrote:
    >
    >
    >
    >
    >
    > > On Sep 13, 2:08 am, kcwong <> wrote:

    >
    > > > On Sep 13, 3:27 pm, Ed <> wrote:

    >
    > > > > On Sep 12, 11:35 pm, Lew <> wrote:

    >
    > > > > > Ed wrote:
    > > > > > > The sample code below doesn't work, but if you take out the Question
    > > > > > > Mark character, "?" in front of the value "Print" of the "action"
    > > > > > > attribute, it does work!

    >
    > > > > > > Does anyone here know an other workaround? Thanks in advance!

    >
    > > > > > You need to watch where line breaks go in source posts to Usenet. You got a
    > > > > > stray greater-than character ('>', a.k.a., "right angle bracket") that
    > > > > > belonged with the xml PI, but was somehow moved to a different line.

    >
    > > > > Come on, dude! Are you so stupid, to not understand that the code
    > > > > works, and you may need to move the bracket, where it supposes to be,
    > > > > when running it!

    >
    > > > > > Also, the variable "XMLString", being a variable, should start with a
    > > > > > lower-case letter, by convention.

    >
    > > > > Where did you get that rule, Mr. Conformist!
    > > > > Don't lecture to anyone here, your nonsense rule! Try to think out of
    > > > > the box sometime!

    >
    > > > > > > public class Questionmark_TEST{
    > > > > > > public Questionmark_TEST(){}

    >
    > > > > > > public static void main(String [] args){
    > > > > > > String XMLString =
    > > > > > > "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
    > > > > > +
    > > > > > > "<categories><NodeOne action='Print?'/></categories>";

    >
    > > > > > > String OldNode = "<NodeOne action='Print?'/>";
    > > > > > > String NewNode = "<NodeOne action='Print?'>empty</NodeOne>";

    >
    > > > > > > XMLString = XMLString.replaceAll(OldNode,NewNode);
    > > > > > > System.out.println("new XMLString : "+XMLString.toString());
    > > > > > > }
    > > > > > > }

    >
    > > > > > Did you read the Javadocs on the replaceAll() method?
    > > > > > <http://java.sun.com/javase/6/docs/api/java/lang/String.html#replaceAl...)>

    >
    > > > > > The first argument is a regular expression, in which the question mark has
    > > > > > special significance.

    >
    > > > > But you never answered my question though! Take a look what Roedy
    > > > > replied to me! That's kind of an answer, I was looking for!

    >
    > > > Tsk.

    >
    > > > Lew's reply contain the same information as Roedy's post.

    >
    > > According to you?!?

    >
    > > > To be fair,
    > > > Lew's reply contains *more* information than Roedy's.

    >
    > > I don't need more info! If I need more info, I could have spent hours
    > > surfing the internet, and reading all about the String class and the
    > > XML specification.
    > > I am not a Student and don't have a time, I am a Programmer, and
    > > wanted to resolve my current task!

    >
    > Would you go to a doctor that said they didn't have time to study
    > medicine before treating you? You are not a programmer.
    >
    >
    >
    > > > Lew notified
    > > > you, politely, about the use of regular expression in
    > > > String.

    >
    > > Nope, he was not polite! But Roedy was polite, the other guy was kind
    > > of arrogant, and stupid conformist!

    >
    > Actually, its more than just conformity, there is a real reason to do
    > that. When I first saw your code snippet, I assumed you were using
    > proper convention, so I thought that XMLString was a class that I
    > didn't know about, so wasn't sure that XMLString.replaceAll used
    > regex, even though I know xmlString.replaceAll probably would.
    >
    > > > replaceAll(), netiquette of using usenet, and globally accepted
    > > > Java coding convention,

    >
    > > Globally accepted java coding convention?!?!? Sometimes, you need to
    > > break stupid nonsense rules!
    > > I am a Programmer and I care less of those little nonsense rules which
    > > are not that big deal at all to me, and to anyone who is not too much
    > > conformist!

    >
    > Again, you are not a programmer, you are at this point a troll. If
    > you keep up the flaming any longer, I'd also consider you an idiot
    > (although, you don't yet have that distinction).
    >
    > Would you call a carpenter a conformist because he used "standard"
    > tools and measurements? It amounts to the same thing, it makes it
    > easier to communicate if everyone's speaking the same language.
    >
    > > > while Roedy simply pointed you to what you
    > > > need without much explanation (nothing wrong with Roedy's answer...
    > > > but you won't really learn why unless you act by going to his site and
    > > > read).

    >
    > > No, Roedy explained intelligently, in a few words, what replaceAll
    > > method is all about, and the other guy, fucking mine as he is, he just
    > > started tell
    > > me the code I copied and pasted did not end with a bracket and the
    > > bracked was on the next line! What a stupid and arrogant answer! And
    > > he went on, pasting a link and telling me to read the link, and spend
    > > hours reading all those shit, while I don't have even enough time, to
    > > finish my current task!

    >
    > You're current task is never more important than learning to improve
    > your performance on the next 10 tasks.
    >
    > Also, apparently your current task isn't that high a priority, since
    > you're spending so much time trolling.
    >
    >
    >
    > - Hide quoted text -
    >
    > - Show quoted text -- Hide quoted text -
    >
    > - Show quoted text -


    You are not on my level, fucking dumbass! Tell me since when have you
    been a Programmer?
    **** off!
     
    Ed, Sep 14, 2007
    #16
  17. Ed

    Ed Guest

    On Sep 13, 9:34 pm, Daniel Pitts <> wrote:
    > On Sep 13, 9:07 pm, Ed <> wrote:
    >
    >
    >
    > > On Sep 13, 5:11 pm, Arne Vajhøj <> wrote:

    >
    > > > Ed wrote:
    > > > > On Sep 12, 11:35 pm, Lew <> wrote:
    > > > >> Also, the variable "XMLString", being a variable, should start with a
    > > > >> lower-case letter, by convention.

    >
    > > > > Where did you get that rule, Mr. Conformist!

    >
    > > > From Sun's Java Coding Convention, which you should study.

    >
    > > > Arne

    >
    > > I know that, I can study it, but I don't have to follow some of the
    > > nonsense rules which may be in it! Arne, you don't have to always be a
    > > follower, sometimes, you need to act as aa leader and not fucking
    > > conformist!
    > > Now, you wonder why linux is a much better OS than any other!

    >
    > What's with calling people a conformist?
    >
    > Linux is a better OS because the designer and architect decided on
    > good coding style, where as Microsoft decided to do it their own way
    > despite an existing convention.
    >
    > I agree that *blindly* following rules can be a bad thing. Some rules
    > DO have a reason behind them, and naming conventions tend to help one
    > programmer understand the code written by another.
    >
    > Remember, you're writing the source code for a human, not the
    > computer. The computer could understand terribly obfuscated code, and
    > it couldn't care less. You, on the other hand, would be able to
    > debug, edit, and improve code which was clear and followed a
    > convention you already understand.
    >
    > This is especially true when you ask for help. If aren't able to
    > communicate what you want, then people aren't going to be able to get
    > it to you.
    >
    > I hereby strip you of your "Programmer" title, and deem you a
    > "Trolling Liar".
    >
    > You're a Liar, because you claim to be a programmer, but obviously
    > know nothing of the art and science of programming.- Hide quoted text -
    >
    > - Show quoted text -


    Fucking idiot, you are not on my level! Not only, I have been a
    Programmer for a few decades, but I programm in more than two
    languages as we speak! C++, JAVA, C#. Do you get it?!?

    For your info, you may even be using a Java IDE Compiler written by my
    friends!
     
    Ed, Sep 14, 2007
    #17
  18. Ed

    kcwong Guest

    On Sep 14, 1:34 pm, Ed <> wrote:
    <snip endless stream of uncalled for insults from Ed>

    At this point, one has to wonder that if Ed really has a question to
    ask, or is he started this thread just to troll.

    In any case I don't think Ed will get any more answers from this group.
     
    kcwong, Sep 14, 2007
    #18
  19. Ed

    Ed Guest

    On Sep 13, 10:45 pm, kcwong <> wrote:
    > On Sep 14, 1:34 pm, Ed <> wrote:
    > <snip endless stream of uncalled for insults from Ed>
    >
    > At this point, one has to wonder that if Ed really has a question to
    > ask, or is he started this thread just to troll.
    >
    > In any case I don't think Ed will get any more answers from this group.


    Why? Do you run this group? Do you think I am here to only get
    answers? How about if I am here too, to provide answers? Why do you
    think I am here to get answers only, fucking arrogant!
     
    Ed, Sep 14, 2007
    #19
  20. Ed

    Ed Guest

    On Sep 13, 10:45 pm, kcwong <> wrote:
    > On Sep 14, 1:34 pm, Ed <> wrote:
    > <snip endless stream of uncalled for insults from Ed>
    >
    > At this point, one has to wonder that if Ed really has a question to
    > ask, or is he started this thread just to troll.
    >
    > In any case I don't think Ed will get any more answers from this group.


    **** off, stupid jackass!
     
    Ed, Sep 14, 2007
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mladen Adamovic
    Replies:
    0
    Views:
    744
    Mladen Adamovic
    Dec 4, 2003
  2. Mladen Adamovic
    Replies:
    3
    Views:
    14,636
    Mladen Adamovic
    Dec 5, 2003
  3. Douglas Reith
    Replies:
    11
    Views:
    1,097
    Micah Cowan
    Oct 1, 2003
  4. Ed
    Replies:
    116
    Views:
    2,385
  5. Csaba  Gabor
    Replies:
    2
    Views:
    116
    Csaba Gabor
    May 4, 2006
Loading...

Share This Page