Transform a text messy xml, XQuery (REST)
Hello.
I make a REST call and our server of OSB. I'm supposed to transform plain text, that we call REST in xml. But I have difficulties to find a smart way to do it.
Plain text I send to the XQuery query, like a string looks like this:
01 & amp; Yes & amp; req = someOperation & amp; usernumber = 32213321352& amp; regionnumber =43243352343
Those marked in red are the ones I want to the map as xml (01 - may be the format xx, Yes - can be a string of length up to 30, usernumber and regionnumber are both set length of 11)
What I would like input is.
< test >
< code > < code > 01
< Yes > < / answer >
< unumber> / 32213321352 < / unumber >
< regnumber >43243352343 < / regnumber >
< / test >
I tried to take the text as string and handle it with substring and others, but I couldn't find any good way to do it. Any help is greatly appreciated!
Best regards
Try the following.
05 divide values (assuming that they are get parameters, this split to the &)
06 - remove the name of the parameter, if any (01 and Yes don't have it)
08-15 assign values to elements by their position
{ for $i at $pos in tokenize( '01&Yes&req=someOperation&usernumber=32213321352®ionnumber=43243352343', '\&' ) let $value := replace( $i, '\w+=', '' ) return if ( $pos eq 1 ) then {$value}
else if ( $pos eq 2 ) then{$value} else if ( $pos eq 4 ) then{$value} else if ( $pos eq 5 ) then{$value} else () }
Tags: Fusion Middleware
Similar Questions
-
transform of text file content in a drop-down list box
Hi people,
I have a file text filled with orders. and I would like to transform this text file in a drop-down list box ring, how can I do?
text file attached.
Lee
Is not no matter what extract lines. Which is just dumping the contents of the file directly on the ring. Which can be accomplished by simply doing this:
-
characters available in the area of dynamic text through XML
Hello
I'm working on an application with Flash and AS3. I am dynamic import text with XML through PHP MySQL database. So far, I had all this work.
Although the available character set appears to be very low. I have to be able to use characters such as e (HTML eacute) and o (ouml HTML) and others that are widespread in the Netherlands. Anyone know how to get these characters working?
Any help is greatly appreciated
It's Arial should be the incorporation. Thank you very much I'll try to fix this.
-
Preserve conditional text in XML with FM 7.2 files
Using FM 7.2, you add conditional text in an XML file, save the file (in XML format) and then reopen, are preserved conditional text? I know that it works with later versions of FM, but it also works with FM 7.2?
Thank you very much
Jesus
According to the parameters of conditional text in the application definition in structapps.fm or in another application definition file, Yes. Conditional text in XML support has been added in FM 7.1.
-Lynne
-
Dynamic text called XML - how to create a line break
I'm the filling of an area of dynamic text with xml elements that I call
For example, I have two text fields and fill me help
TextTime.texttest.Text = (bktrlXml.Row, [e.currentTarget.Ivar], .tester);
TextTime.textName.Text = (bktrlXml.row [e.currentTarget.ivar]. NAME2);
How do I fill in a dynamic text field using a combination of the two above? I would also like to put a line break between the two elements. I tried something like that and could not understand it
TextTime.texttest.Text = (bktrlXml.Row [e.currentTarget.Ivar] .tester) + "/ n" (bktrlXml.row [e.cur rentTarget.ivar]. NAME2);
Thanks in advance...
-j
Use the back slash, not oblique:
TextTime.texttest.Text = (bktrlXml.Row [e.currentTarget.Ivar] .tester) + "\n" + (bktrlXml.row [e.cu rrentTarget.ivar]. NAME2);
-
Select the block of text of XML structure
I try to move the specific text blocks created if an XML to import to the bottom of the page (low mounting table) as info Folio and slug.
I can choose the text associated with an XML "VTag" element, but not the text block. Any help would be appreciated.
Thank you
property myHoHoV: {}
on myLoopLoop (myElement)
Tell application "Adobe InDesign CS4"
tell the active document
the value moreElement for each XML element of myElement
Repeat with 1 x to (moreElement County)
the value of element x of moreElement em1
Select em1
If (the tag name of the em1 is "VTag1") then
em2 Set to em1
Set the properties of the display preferences {horizontal measurement units: inch, vertical measurement units: inches, origin origin: the rule page}
at the top left anchor the transform value point of reference of the window layout 1
Select text of em2
Tell application "Adobe InDesign CS4"
move the em2 text to {5, 5}
tell the end
end if
Tell me myLoopLoop (point x of the moreElement)
end repeat
tell the end
tell the end
end myLoopLoopHi Kyran,
If the previous code has a problem, then try this code below.
Tell application "Adobe InDesign CS4"
activate
the value myPageHeight at the height of the page of the preferences of the document 1 document
the value myPageWidth to the width of the page of the preferences of the document 1 document
the value myOldRulerOrigin at the origin of the rule of document 1 display preferences
the original value of the rule of 1 at the origin of the page display preferences
Set the zero point of the document 1 to {0, 0}
the value mapping page active of the active window
tell document 1
the pgcnt value to count pages
Repeat with 1-pgcnt p
tell the page p
the txtframe value to count blocks of text
Repeat with 1-txtframe f
the value paracnt to count paragraphs of text frame f
tell text frame f
Try
TagName {} Set
Repeat with 1 paracnt access point
end game of tagname to (name of the tag to (point 1 of the associate XML elements) paragraph ap) as string
end repeat
If ((comte de tagname) is equal to 1) and (each point of tagname contains "VTag1") then
Select
move to {0.125, myPageHeight + 0.125}
on the other
don't select anything
end if
try to end
tell the end
end repeat
tell the end
end repeat
tell the end
activate
Display dialog "process is complete...". "with the 1 icon
tell the endConcerning
MANi
-
Error in getting the brother following non-text for XML without CR at the end of tag
Hello all,.
I have a strange error of parsing XML files with labview. I have an XML file in a single line, without CR at the end of each tag. A normal browser or analysis tool XML is able to read, but not with Labview.
The error I have is with "Get Next non-text Sibling.vi", which in their own country fails to read the Type property (error-2630, property node (arg 1) in NI_XML.lvlib:Get next non-text Sibling.vi-> XML Get siblings Childs Nodes.vi-> encode data to label (Path) .vi).
Parser XML LabVIEW works if I add a CR to each node/tag.
I am quite sure that this is a bug in labview. I found a workaround is to open the file, then save the file with the Save File (Pretty Print) method and then open again, but it's a lot of time and I would avoid it.
Kind regards
Daniele
You were right, I did my own necessarily get a brother following text nodes (which also includes RC, I did not know it!).
Now it works, there is no bug of labview, also if the functions XML documentation is very poor.
Thank you
Daniele
-
How can I convert text to XML format in plain text?
Oracle 11 g 2: 11.2.0.4.0
I have data that is parsed from XML and saved in a table as a field of type VARCHAR.
The text is formatted as follows:
&lt;span style=&quot;font-family:'Times New Roman','serif'; font-size:12pt&quot;&gt;24 PC'S &amp;quot;6 x 4up arrays&amp;quot; =&amp;nbsp; MAX FOR MIN QTY AT INDICATED LOT CHARGE &lt;/span&gt;&lt;br&gt; Material currently in stock
I need to remove the formatting and convert the text to this:
24 PC'S 6 x 4up arrays MAX FOR MIN QTY AT INDICATED LOT CHARGE Material currently in stock
Is there an existing function in SQL or PL/SQL that will decode the formatting?
Thank you
-Johnnie
This text is a string of HTML to the doubling actually escape sequence, because it contains a
tag.Therefore, you must:
-unescape any coded entities twice
-replace the
tag with a character LF - optional step depends on how you want to manage-remove all tags (using a regular expression)
-eliminate the remaining entities
This query will do:
SQL> select utl_i18n.unescape_reference( 2 regexp_replace( 3 replace( 4 dbms_xmlgen.convert(dbms_xmlgen.convert(str, 1), 1) 5 , '
' 6 , chr(10) 7 ) 8 , '<[^>]+>' 9 ) 10 ) 11 from sample_data ; UTL_I18N.UNESCAPE_REFERENCE(RE -------------------------------------------------------------------------------- 24 PC'S "6 x 4up arrays" = MAX FOR MIN QTY AT INDICATED LOT CHARGE Material currently in stock -
Transformation of text box handles does not
Hi all
When you attempt to change the size of a text box, the text transformation handles do not register a click.
So, essentially, once the text box has been developed at the outset, I can't re - size.
Does anyone else have this problem?
I use the latest version of Photoshop shipped updates to creative cloud. And this problem seems to have happened overnight.Any ideas?
(See image below)Then, when I try to click and drag on a handful of corner or transformation, the click does not record and photoshop simply disables the text box.
Thanks in advance!
Yes, it's the same thing, just an easier way to do it. I've seen this happen with Illustrator and how it was fixed was by reinstalling Illustrator, but I don't know if that will apply with Photoshop.
-
Transform node pieces and paste the rest
Hello
It's hard to explain what I need. Here is an example:
XML:
Output:<DOCUMENT> <PAGE> <PAGEHEADER type="1"> </PAGEHEADER> <block>Hello</block> <block>World</block> <line>This is a test</line> <GREETING type="2"> </GREETING> </PAGE> </DOCUMENT>
There are several standard subnodes for PAGE: PAGEHEADER, WISHES,...<DOCUMENT> <PAGE> <PAGEHEADER type="1"> ... </PAGEHEADER> <block>Hello</block> <block>World</block> <line>This is a test</line> <GREETING type="2"> ... </GREETING> </PAGE> </DOCUMENT>
This isn't a problem to transform these nodes, but I want all the non-standard nodes (block, line,...) to the title of the PAGE without changes in the output xml file.
XSL:
Is this possible?... <xsl:output method="xml"/> <xsl:stylesheet> <xsl:template match="/"> <DOCUMENT> <xsl:apply-templates/> </DOCUMENT> </xsl:template> <xsl:template match="PAGE"> <PAGE> <xsl:apply-templates/> </PAGE> </xsl:template> <xsl:template match="PAGEHEADER"> ... </xsl:template> <xsl:template match="GREETING"> .. </xsl:template> <xsl:template match="?? non standard nodes ??"> .. </xsl:template> </xsl:stylesheet>
Thanks for the reply
Attackwave
Published by: ORDIX Attackwave January 2, 2012 12:47Is this possible?
Of course, it's a classic ;)
Use a style sheet based on the transformation of identity and add specific templates to process the nodes you want to:
For example:
will produce:
Hello World This is a test -
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 advanceYou have an encoding nothing
-
update the text with xml, DDL data fields a selection of an identification number
Hi guys,.
It should be simple, but I can't seem to find a straight answer. In short:
The XML file contains the ID, name, location (so 3 extreme records in the example xml file)
Form contains a dynamic drop-down list to allow the selection of ID and text fields to display the names of the partners and the location of this ID. The setting of the drop-down list works fine, however I need to update the associated name and location if different from the other ID's fields are selected. I guess I'll need some sort of event on the menu drop down update other fields with the name and location of the selected ID, but I don't know enough to have a stab at him.
Please, please, please help, Im starting to pull my hair.
James.
Sorry, looking at him again I could have given a better description of what is happening.
Have a look at this sample https://acrobat.com/#d=NO5o6NhPTQgSYu3SVoN7rQ and data to go with her https://acrobat.com/#d=jN * pRT4uGg05VU * sGWvjcA
The thing I should have said and I guess that's your problem is the the Data property, I used in $data. Data.resolveNode (...) must match the item parent of the element of your event if xml looks like
1 name 1 Location1 It should be $data.events.resolveNode (...)
Maybe I should have used "itemGroup var = $data.resolveNode ("events.event.» (()_eventId.value_===_«_«_+_xfa.event.change+_»_») "); "in this case, but I try and do the resolveNode go as low as possible.
Concerning
Bruce
-
Transformation of text does not appear at run time?
Hello
I'm having a problem where the text that I have transformed (rotation) does not appear when I test the movie. I'm using Flash CS4.
If they are dynamic textfields, you must embed the police
-
Analyze text in xml doc?
Hi all
I have a XML like this
< controls >
< Entry >
Key to <>< / key >
< down > < / down >
< / Entry >
< Entry >
Key to <>< / key >
< down > < / down >
< / Entry >
< / controls >
And a text like this documentThrottle_10, F2 + 1
Throttle_20, F2 + 2
Throttle_30, F2 + 3
Throttle_40, F2 + 4
Throttle_50, F2 + 5
Throttle_60, F2 + 6
Throttle_70, F2 + 7
Throttle_80, F2 + 8
Throttle_90, F2 + 9
What I need to be able to do is to add the first element of the text document to the key to <>< / key > and the second element < down > < / down > xml file...How better would you do this please?
Thank you very much
You are welcome. Please mark the thread as answered.
When you call load before adding listeners, particularly in the local environment, things happen instantly, and the file is actually loaded before the event is dispatched if your application cannot hear this event. In other words, when you call load() things start happening immediately, but event listeners are added after the load starts to run.
-
Move an item of text lower than the rest.
I'm wet behind the ears here and need a
step by step instructions on how to move the 2 in H2O slightly
less than the rest of the text. I have a background layer that must
to stay blue.
There may be several ways, but a simple method is the following:
1. Select the text (T) tool.
2. your visible CHARACTER Panel by selecting window - character
3. click on your layer text and using the mouse select just the 2 in the chain of H2O.
4. in the CHARACTER Panel, put a negative value in the baseline shift box bottom left.
5. you can change the size by changing the value in the font size at top left as well.
-Christmas
Maybe you are looking for
-
Some newbie need help to display the Properties window
Hello! I am writing this issue on behalf of another Member of our association, which does not much English. We bought him Final Cut Pro X, so that he can learn a few video do, and he is very enthusiastic about it. We first had a try of FCP X, and the
-
Replacement of hard drives NAS Pro StorCenter ix4-200r 2.1.48.30125
Hi all I need your help with replacement of disks problem I have an Iomega StorCenter Pro NAS ix4-200r (Firmware 2.1.48.30125) installed originally with 4 x 1 TB of hard drives.I had to replace a faulty drive, and on this occasion, I replaced 4 disks
-
Anyone who has used a to the SlateBook 2 x 128 GB SDXC card?
-
call Windows support services of cold?
I have an international phone call from someone wearing the to come from windows support services. He told me that I had to check my computer as there had been a lot of downloaded virus - not specifically for my own computer. I told him that it was e
-
Windows XP Professional will not recognize my key USB flash drive in the USB ports before; However, it does not recognize the flash drive in the back USB ports of the Tower pc which is very annoying. How can I get the drive J it is called on the fron