How to make with < > in the text - InfoPath Dev
in

InfoPath Dev

Having trouble finding a blog or post that answers your question? Check out our Custom Search Page

How to make with < > in the text

Last post 12-09-2005 07:15 AM by Matt Faus. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 11-29-2005 08:00 AM

    How to make with < > in the text

    Hi,

    I wan't to make a replace node with a text that can contain < >

    newt:
    <Text>bonjour je m'appelle # et je suis content de faire le #.<eigene buro></Text>  


    If I try to make my code:


    IXMLDOMNode oNodes = e.Source.parentNode.selectSingleNode("Text");

    IXMLDOMDocument2 oDomSearchHRG = (IXMLDOMDocument2)thisXDocument.GetDOM("getAVtit");

    IXMLDOMNode newt =oDomSearchHRG.selectSingleNode("/Text");
    oNodes.parentNode.replaceChild(newt,oNodes);



    How can I made for don't have this error?

    Thanks

    Thierry

    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 11-29-2005 09:30 AM In reply to

    Re: How to make with &amp;lt; &amp;gt; in the text

    Have you tried using "<" and ">" in place of "<" and ">" ?

    Greg Collins [InfoPath MVP]
    InfoPath Dev
  • 11-29-2005 01:27 PM In reply to

    Re: How to make with &amp;lt; &amp;gt; in the text

    Haha, it seems the forum software is even tricked by your escape characters, Greg.

    What he was trying to say was to use ampersandlt; and ampersandgt;.

    Like this: "& l t ;" with all spaces removed and "& g t ;" with all spaces removed.


    See this list for further reference:http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php

    ---------------
    Matt Faus
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 11-29-2005 01:31 PM In reply to

    Re: How to make with &amp;lt; &amp;gt; in the text

    Guess I should have double-checked my message after I wrote it :o)

    Greg Collins [InfoPath MVP]
    InfoPath Dev
  • 12-01-2005 01:17 AM In reply to

    Re: How to make with &amp;lt; &amp;gt; in the text

    Hi,

    Thanks for your reply!

    Yes I know that! In my xml there are like & l t ; and & g t ; but If I make a selectsinglenode this is replace by < and >!

    But If I try to send my form by mail in infopath user mode that send me my lt and gt for this node!

    So how to make a selectsingle node without transform lt and gt in <, >?

    I have make the same error as greg when I publish I don't have seen in this:
    quote:
    I wan't to make a replace node with a text that can contain < >
    ...
    <Text>bonjour je m'appelle # et je suis content de faire le #.<eigene buro></Text>

    have been translated by the forum! Sorry

    Have you any idea for find a work around?

    Thanks a lot!

    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 12-01-2005 06:03 AM In reply to

    Re: How to make with &amp;lt; &amp;gt; in the text

    After you get your string from selectSingleNode() search for every instance of "<" and ">" and replace with "& lt;" and "& gt;" before you put it into your e-mail message.

    I don't know exactly what this would be in the language your using (C# ?), but in JScript it would be:

    str = str.replace( "<" , "(&)lt;" );
    str = str.replace( ">" , "(&)gt;" );

    ---------------
    Matt Faus
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 12-08-2005 11:34 PM In reply to

    Re: How to make with &amp;lt; &amp;gt; in the text

    ok Thanks Matt! but there are another problem that I don't have explain before it's a plain text box! And in this you can have some highlight or bold character so:

    <texte id="2">Salut tu vas <b xmlns="http://www.w3.org/1999/xhtml" style="BACKGROUND-COLOR: #339966" id="N" title="Et toi?">^</b> moi ca va.<eigene buro></texte>


    If I do like you say that repace me all the < , > and I have no more bold or highlighting Infopath can make the difference why I can't in code? Is there a way?

    ++

    Thierry
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 12-09-2005 07:15 AM In reply to

    Re: How to make with &amp;lt; &amp;gt; in the text

    How about....

    str = str.replace( "<eigene buro>", "&_lt;eigene buro&_gt;" );

    ---------------
    Matt Faus
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (8 items)
Copyright © 2003-2014 Qdabra Software. All rights reserved.
View our Terms of Use.