Search XML with or without special characters

Hello

Please I need your help: I have this XML:

<nodoPrincipal >
<content linkName="" url="" linkType="multi" searchableTerms="generación, vida, familia, ">
<multiLink url="cdw/day1/iAmFrom.doc"/>
<multiLink url="cdw/day1/iAmFrom.pdf"/>
</content>
<content linkName="" url="" linkType="multi" searchableTerms="casa, cama, ropa, ">
<multiLink url="cdw/day1/influences.doc"/>
<multiLink url="cdw/day1/influences.pdf"/>
</content>
<content linkName="" url="day1/Strengths.ppt" linkType="dl" searchableTerms="teléfono, celular, computación, ">
<desc><![CDATA[Strengths Finder]]></desc>
</content>
<content linkName="" url="" linkType="multi" searchableTerms="objeto, carta, mesa, ">
<multiLink url="cdw/day1/haveDoBe.doc"/>
<multiLink url="cdw/day1/haveDoBe.pdf"/>
</content>
</nodoPrincipal>

And this search feature:

//xml loaded above
function processSearchXML(xmlData:XML, searchTerm:String):XMLList
{

  var searchData:XMLList = xmlData.*;

  //if the node has searchable terms, add it to the list
  var searchTerms:XMLList = searchData.(hasOwnProperty('@searchableTerms'));

  //A list for the results
  var searchResults:XMLList = new XMLList();

  for each(var searchItem:XML in searchTerms)
  {
  //gets the attribute searchableTerms 
  var searchSplit:String = [email protected]();

  //builds the array of " , " seperated values
  //so that I can have multiple search terms 
  var searchTerms_ary:Array = searchSplit.split(", ");
  //A list for the results
  var searchResults_ary:Array = new Array();
  //trace(searchTerms_ary.length +" searchable terms in node");

  //search the array 
  for each(var term:String in searchTerms_ary)
  {
  //if the record matches what I searched for, add it to the results array
  if (term == searchTerm)
  {
  //trace(term + " has met the seach craiteria");
  searchResults_ary.push(term);
  }
  }
  //trace(searchResults_ary.length +" results in node");
  //trace();
  //if anything was added to the array 
  //add the branch to the xml list 
  if(searchResults_ary.length != 0)
  {
  searchResults += searchItem;
  }
  }
   trace(searchResults);
  return searchResults;
}

With this feature, I did find whole words, but I want to search for parts of words and search with special characters such as: phone or TV

Help me invite!

use indexOf instead of checking for a match if you want to retrieve partial matches.  for example,.

If (term.indexOf (searchTerm) > - 1).

Instead of

If (term is searchTerm)

Tags: Adobe Animate

Similar Questions

  • Export of database with password containing special characters

    Hello

    I do an export of data by using the command:

    exp userid=user/pass@instance parfile = exp_parms.dat

    The problem is that the password contains special characters, if the command fails with a syntax error. The command works perfectly fine when I run it without the password and just type in the prompt, but I need to include the password in the command because I'm running it in a batch file. I tried to use the escape character (\), but the result is an inconsistency of name of username-password.

    Is it possible to declare a password containing special characters in the command "exp"?

    ... Thanks in advance!

    Hello

    I'm using linux and this is how I did it.

    I created a user named ddg with ddg password) ddg

    I did my expdp as order:

    expdp ddg / directory "ddg ddg\)" = dpump_dir dumpfile = ddg.dmp

    Put the password in quotes and escape with a funny character.

    I hope this helps.

    Dean

  • Problem with cfhtmltopdf and special characters

    How can I fix cfhtmltopdf showing '? ' for special characters "1/2", "3/4", "•"? We have 11,0,07,296330 Standard in ColdFusion Server installed.

    After further research and discussed with our system/DBA administrator, we suspected that he needed the CF11 Server JVM setting. We have added '-Dfile.encoding = utf8 "to java.args in ShadoMX/util/Flex/SDK/bin/jvm.config and special characters displayed correctly.

  • XML with embedded BLOBs 4000 characters maximum

    Hi all

    My proc (PROCEDURE pr_xml (pi_xml IN XMLTYPE)) database is delegated an XMLTYPE object as a parameter (from .NET). This doc XMLTYPE contains data image (in HEXADECIMAL format) that I need to store in a BLOB column. I can do this OK if the image is & lt; 4000 characters. If it is more than that, I have a problem. I tried the following two queries to get the BLOB data:

    proc definition is

    (1) select image
    FROM XMLTABLE (' / DocumentElement / pic_record ' PASSAGE xmltype ('))
    & lt; DocumentElement & gt;
    & lt; pic_record & gt; & lt; PIC & gt; FFD8FFE000104A46494600010101006000600000FFE10066 & hellip; & hellip; & hellip; & hellip; & lt; / Peak & gt;
    & lt; / pic_record & gt;
    & lt; / DocumentElement & gt;
    The COLUMNS ') image VARCHAR2 (4000) path 'Pic')

    (2) SELECT extractvalue (column_value, 'Peak')
    TABLE (xmlsequence (extract (xmltype ('))))
    & lt; DocumentElement & gt;
    & lt; pic_record & gt;
    & lt; pic_record & gt; & lt; PIC & gt; FFD8FFE000104A46494600010101006000600000FFE10066 & hellip; & hellip; & hellip; & hellip; & lt; / Peak & gt;
    & lt; / pic_record & gt;
    & lt; / DocumentElement & gt;
    (((, ' / DocumentElement/pic_record/Pic ")))

    Using 1) I expect to be able to declare the COLUMN as a BLOB (VARCHAR2 (4000) - above), but the only types that you can use are MANY and VARCHAR.
    Using 2) complains about the function of extractValue above 4000 characters.

    Does anyone have any experience or suggestions. Thank you

    Tim

    Try extract () .getClobVal ()... However, it won't work that (at least in the pre - 11 g databases) if the size of PIC in it is encoded form is less than 64 KB. In addition, you are out of luck until the 11 g version. A better way to do it (at least in 11g) is to store the XML in a storage schema that maps the correctly coded data.

  • SLM2048 - problems of password with special characters

    Hi all

    We´ve got a SLM2048 in use (more updated FW) and I wanted to ask our new standards of password on this switch. So I changed the password for the admin user and used special characters, that were = &! = and clicked on update and save the changes. Now, I know that I should use alphanumeric characters only, but why are there no routine that checks the IPL for compliance before writing it on the switch.

    Problem now is that I'm unable to open a session and Don t want to do a hard reset, because the pattern would be lost. I know it should be a user admin rescue, but there is none.  What can I do now? Any chance that a cisco engineer could get in touch with me to debug the password entered in the laboratory and then, who could tell me what was recorded in ROM or how I can connect again?

    Thank you

    Philippe

    Hello

    I will ask our PM on a routine that checks for characters and whether or not they are acceptable for the system.  We should also make this more clear in the Administrator's guide.

    Just thinking out loud here... If she had the character, I wonder if he he replaced by a space, stars or a different character.    Have you tried with spaces where special characters have been?

    HTH,

    Andrew Lissitz

  • Special characters escaped HOWTO if you use regexp_replace and regexp_substr

    Hello experts,

    following test case

    insert into querytest1 (d) values

    ("#1 (170): [{'type': 'FACEBOOK', 'count': 0, 'Larry': 1382627403299}, {'type': 'GOOGLE', 'count': 0, 'Larry': 1381825285002}, {'type': 'EMAIL', 'count': 2, 'Larry': 1381826322925}] #2(0): #3 (5):-3141 #4 (5):-3141 #5 (5): 21804 #6: (7) 3890750 #7(3): s11'");

    Select regexp_replace (d, REGEXP_SUBSTR (REGEXP_SUBSTR (d, ' [^] +', 1, 1), "[^:] +' 1, 2"), ") of querytest1;

    ERROR on line 1:

    ORA-12726: unparalleled support in regular expression

    evidence that the characters special [] {} are the problem:

    delete from querytest1;

    commit;

    -Insert data without special characters

    insert into querytest1 (d) values (' #1 (170): 'type': 'FACEBOOK', 'count': 0, 'Larry': 1382627403299, 'type': 'GOOGLE', 'count': 0, 'Larry': 1381825285002, 'type': 'EMAIL', 'count': 2, 'Larry' [: 1381826322925] #2(0): #3 (5):-3141 #4 (5):-3141 #5 (5): 21804 #6: (7) 3890750 #7(3): s11');

    Select regexp_replace (d, REGEXP_SUBSTR (REGEXP_SUBSTR (d, ' [^] +', 1, 1), "[^:] +' 1, 2"), ") of querytest1;

    REGEXP_REPLACE (D, REGEXP_SUBSTR (REGEXP_SUBSTR(D,'[^]+',1,1),'[^:] +', 1, 2), ")

    --------------------------------------------------------------------------------------------------------------------

    [#1 (170): 'FACEBOOK', 'count': 0, 'Larry': 1382627403299,: 'GOOGLE', 'count': 0, 'Larry': 1381825285002,: 'EMAIL', 'count': 2, 'Larry': 1381826322925,: 'EMAIL', 'count': 2, "Lamarre": 1381826322925] #2(0): #3 (5):-3141 #4 (5):-3141 #5 (5): 21804 #6: (7) 3890750 #7 (3): s11

    so now it works because there is no characters [special])

    is there a way to escape them?

    Thank you in advance.

    Hello

    Since you are using Oracle 11.2, you can do it with a WITH recursive clause, like this:

    MERGE INTO dst t

    WITH THE HELP OF)

    MORPHING (q, result, n_to_do, start_pos, end_pos) AS

    (

    Q SELECT

    ,       d || ' ' AS a result

    REGEXP_COUNT (q

    , '#\d+\(\d+\):'

    ) AS n_to_do

    REGEXP_INSTR (q,

    , '#\d+\(\d+\):'

    1

    REGEXP_COUNT (q

    , '#\d+\(\d+\):'

    )

    ) AS start_pos

    LENGTH (q) AS end_pos

    T

    UNION ALL

    Q SELECT

    REPLACE (result

    , ':' || n_to_do | ' '

    , NVL (RTRIM (REGEXP_SUBSTR (SUBSTR (q, 1, end_pos))))

    , '#\d+\(\d+\):(.*)'

    start_pos

    1

    NULL

    1

    )

    )

    , 'NULL '.

    )

    ) AS a result

    , n_to_do - 1 AS n_to_do

    REGEXP_INSTR (q,

    , '#\d+\(\d+\):'

    1

    BIGGER (1

    , n_to_do - 1

    )

    ) AS start_pos

    REGEXP_INSTR (q,

    , '#\d+\(\d+\):'

    1

    n_to_do

    ) - 1 AS end_pos

    MORPHING

    WHERE n_to_do > 0

    )

    Q SELECT, result

    MORPHING

    WHERE n_to_do = 0

    ) CBC

    WE (dst.q = src.q)

    WHEN MATCHED THEN UPDATE

    SET dst.result = src.result

    ;

    You can have any number of rows in table t, but they must have a unique key.  I assumed q was unique, highest, but it can be a column or combination of columns.

    It works with any number of values.

    The character "#" can occur in the values, just that it does not part of the point of shells #-figures-leftparen-figures-rightparen-colon. If "#" occurs in this model, you can't simplify regular expressions, as John.

    The above solution was written for the table that you posted in response #6, where q contained values, and d was the formula with the holders of the place for values.  You seem that overthrew in your last message, you may need to reverse I used q and d.

    Whatever your problem, it seems to be a way very uncomfortable to solve.  You need to rethink your data model.  In particular, stroring data in delimited as q lists are a bad idea.  Relational databases work best when when each column contains a single value, not a list of any number of values.  It is so basic to the design of database he called first normal form.

    This would help a lot if post you more simple examples.  Instead of having 7 values, some close to 200 characters, you could show the problem just as well (better, in fact) with 3 or 4 values, no tha 10 don't characters each.

  • Jabber for Windows 11.5 and connection of the unit - German special characters in password

    We Jabber for Windows 11.5.2 running and using the connection of the Unit 10.5.2. Whenever a user uses a password with the German special characters (a, o, u), Jabber is not able to connect to the connection of the unit. Everything else works fine. We also have this problem in 10.6 versions. In the voicemail tab it is said that the name of user or password is wrong. We can reproduce the problem...

    BTW. also it does not work in the current jabber for iOS version!

    Anyone know if it's a bug or experiencingthe same problem?

    I simply make the point that use German special characters causes a lot of problems, in many places, whole CUCM and IM & P and you avoid them.

  • Oracle Text, text search with special characters

    Hi all

    My s/n: 11.2.03

    I have ctxsys.context of index on a column.

    "Now, I would like to find a text like ' 891-000-33-01" (without ").

    The problem is that I can't find row propely when I write *'891 000 33 01'*,.
    and no result of lines when writing normal *'' 891-000-33-01 *.

    How to build an index, or what I do the text you enter in text typed with special characters, looked for and did not like google search (* when you write in google "cat - animal", serach engine returns the result of no animal cat *)

    Concerning

    The character 'less' is a special character and must be escaped if you don't want to do a subtraction.

    You can use "891\-000\-33\-01" or "{891-000-33-01}.

    Note that by default "-" is a newline character, so each set of numbers will be indexed as a separate token. If you want the "-" to be indexed as part of a single token, you will need to set it as a character PRINTJOINS. You will still need to escape in the query.

  • Problem with special characters loaded from XML

    I have a XML with elements that contain special characters (for example: n, N, a, A, etc.), when I load the code XML and do a Trace () the element responsible, I see that it is loaded correctly, but in the text field is not special characters. For example, in the XML file, I have the Bañostext, but in the field indicated text Baos.

    It is clear that in the text field consist of uppercase, lowercase, numbers, punctuation symbols, and basic Latin characters.

    I also tested with stop System.useCodePage = true in the code, but does not.

    Thanks for any help you can give me.

    Garchabig.

    PD: Sorry for the bad English, I'm Latino. -

    embed a font that contains the characters required.

  • Using XML with special characters - not rendered

    Hello

    I use xml to fill the contents of a Flash file, but we located the contents for different regions of the world. Thus, when the content contains special characters like 'e' that they don't appear at all in flash. I tried using & eacute; but making just the actual code...

    Is there a solution for this?

    Thank you

    Rothrock,

    With your help, I was able to determine exactly what was going on. You hit the nail head when you mentioned the police include parameters. The people who originally created the file not selected one of the Latin glyphs or no matter what foreign glyphs, so I changed it and republished.

    Another problem was that the XML of files that I saved in Homsite were detects not properly register with the UTF - 8 encoding as default does not read Homesite file encoding when you open a file. I changed the setting and now correctly saves it in a file encoded in UTF - 8. (for those who need to know how to change this setting, go to the top in the Options > settings > file settings > check the box ' Enable non ANSI file encoding. ")

    Thanks for your help, might not have thought of it otherwise!

    Edit: This accidentally marked as the answer, but Rothrock was indeed the answer n the post above...

  • Get a JButton text of XML with special characters

    Then... I have this little app that takes care of each button, label, etc. of an external XML text
    as a language pack. BUT the part of Spanish language has special characters like "n" and I can't get it to appear correctly...
    I use XStream to load the xml file.

    Any ideas?

    Thanks in advance

    You have an encoding nothing

  • Special characters when binding with word

    Hello world

    I have a problem with my project I hope there is an easy solution.

    I create a pre-existing some word documents WebHelp project and I'm linking them so it can all be updated more easily.

    My problem is that when the files are imported html files are named after the section titles, some of which have special characters such as '-', and '& '. Once uploaded to the Web server, files with special characters do not work and if they are clicked on in the table of contents provide a wicked big error indicating that the file does not exist (it adds the ASCII number in the file name). Cannot change the configuration of the server, so I need to make sure that the files have not all characters like that in them.

    Once imported, I'm not able to change the file by right click on the page name and go to properties and removing characters.

    Is there a way I can easily solve this problem without changing the titles in the word files?

    See you soon,.

    * Edit I use RH9

    Post edited by: leecare

    Search the model HLO of topic name. It is field you will see when you import and I think that should help you.

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • Windows Search - search for special characters

    Hello

    I didn't chance for this search for this kind of things via the interwebs/googlebing (probably due to the wick to 'Search'...

    In any case, I'm looking in the files for the XML files that contain specific characters, and when I'm looking her apparent there are many parts of these (INDEXED location) are ignored...

    for example:

    content: ~ "change."

    Does NOT return the file that starts:

    you are simply looking for a 'Change' returns this file but also returns files that have things in it that I don't want...

    Research Action = 'Change' returns nothing...

    The CustomerOrder search also returns nothing...

    What is the secret for including things like - mark, equal to, oblique, oblique, braces, brackets, single quote, double quote and so on...?

    Indexing is not necessary for the search function.  It is only necessary for the use of the libraries feature and to be able to search for files in the search/ORB box start and also to allow to change the options to search for specific file types.  In any case, I did a test earlier - apparently Windows 7 search search files for all the texts present xml content.  I found this link which describes the hoops to jump through.  We must be able to search xml files in plain text to the search, not the default filter special MS to xml files.

    http://blog.sdbonline.com/2011/09/Windows-search-and-XML-files.html

  • How to remove special characters from the string using translate() without typing all special characters?

    Hi all

    I am trying to remove special characters without the help of regular expressions.

    translate (the column name or string,'!@#$ & * (* () _) * "" :} {?}) >? /, «, » ')

    I want to eliminate this manual process to give all special characters using a chr() or ascii() function.

    Please show me the way.

    Thanks in advance

    Similar to the solution of Michael...

    SQL > ed
    A written file afiedt.buf

    1 with t as (select "[it comes of the #] [more amazing!") Test @# "$* & $%) assuming chain cost $ 5 000' double Str)
    2, i like (select level 1 c from dual connect by level<=>
    3 less
    4 Select + 32 (level-1) double connect by level<=>
    5 less
    6 select + 58 (level-1) double connect by level<=>
    7 less
    8 select + 91 (level-1) double connect by level<=>
    9 less
    10. Select 123 + (level-1) from dual connect by level<=>
    11 less
    12. Select 255 double
    13            )
    14, ts as (select level r, substr (str, level 1) c
    15 t
    16 connect by level<=>
    17             )
    18, tf as (select row_number() (order for r) r
    19                    ,ts.c
    20 TS
    21 I join on (i.c = ascii (ts.c))
    22             )
    23 select replace (sys_connect_by_path(c,'!'),'! ') Str
    24 TF
    25 where connect_by_isleaf = 1
    26 connect r = prior r + 1
    27 * start with r = 1
    SQL > /.

    STR
    -----------------------------------------------------------------------------------------------------------------------
    Thisisthemostamazingtest¸astringcosting5000

    Or something as horrible as this...

    SQL > ed
    A written file afiedt.buf

    1 with t as (select "[it comes of the #] [more amazing!") Test @# "$* & $%) assuming chain cost $ 5 000' double Str)
    2, I like (select replace (sys_connect_by_path (chr (c), 'A'), 'A') as tr)
    3 of)
    4 select c, rownum r
    5 (select 32 + (level-1) as the double connection by level c<=>
    6                         union
    7 select + 58 (level-1) double connect by level<=>
    8                         union
    9 select + 91 (level-1) double connect by level<=>
    10 the union
    11. Select 123 + (level-1) from dual connect by level<=>
    12 union
    13. Select 255 double
    14 tri 1
    15                        )
    16                  )
    17 where connect_by_isleaf = 1
    18 log r = prior r + 1
    19 start with r = 1
    20            )
    21 select translate (str, 'A' |) TR, 'A') as str
    22 * t, I
    SQL > /.

    STR
    --------------------------------------------------------------------
    Thisisthemostamazingtest¸astringcosting5000

  • DBMS_LOB. FileExists returns 0 for BFILE with special characters in their names

    Hello.

    As part of a migration, I'm trying to load these binaries (mostly PDFs) in a column of type blob of a table (oracle 11 g).

    Before loading the file, I get the positioner with bfilename and search for fileexists.

    The problem is that I found several false negatives for dbms_lob.fileexists, all files with special characters in their names, like a e i o u, for example.

    Any sugestion to work around?

    I have change the message to add nls info, as it is migth play an important role

    The database is in AMERICAN AMERICA WE8MSWIN1252

    (Don't know why)

    and my session is in SPANISH SPAIN

    After a lot of tryal and error, I found the answer. Here it is:

    src_loc: = bfilename ('MYDIR', Convert (l_filename, 'AL32UTF8'));

    Now, plsql block "sees" the file.

Maybe you are looking for

  • Laptop HP G62 - just stop job sound

    I don't know what happened, but there are about 30 minutes, the sound came out. I restarted my laptop and no sound.  I plugged my earpiece and still no sound. HP G62 laptop Windows Home Premium - 64-bit

  • Chinese

    My computer says that the Chinese supports limited support, how to use it?

  • Is it possible to hide the permissions dialog?

    Hello I use the Application API authorization to check and grant permissions. Is there a way I can hide the screen that shows the requested permissions? If the user needs only to see "the application request to change permissions" and then, when the

  • OS5 + BrowserField: Problem closing the browser automatically on redirects

    I'm trying to create a field of browser, search for redirects and close the page, so go back to the last page. Look on the ground of the browser after you have requested a page and receive calls such as documentLoad(), I'm trying to close the screen

  • Portrait of 4.5

    In 4.5 my app is portrait, how do I get that back to the landscape and stop rotating on the device?