Bug regex parser since 15.0.0.223

Hi,
I have a major issue on the version 15.0.0.223
I have the following regex :
/\${((?>[^${}]*)(?:(?>[^${}]+|(?R)))*(?>[^${}]*))}/
I use it in a Parameter resolver to match the first encountered ${...} on strings like:
"${serverBaseURL}/${appName}"
"Some string thiny says : ${field0.subfield}--${field1.${field2}.subfield13}"
When I test on previous versions of flash it works fine. But it fails on 15.0.0.223
I tested out of my own solution to be sure, using : http://www.sevenson.com.au/actionscript/testing-regular-expressions/
for "${serverBaseURL}/${appName}" It works on the version 15.0.0.189 and anterior and find this:
0 = ${serverBaseURL}
1 = serverBaseURL
(i then procedurally go to the next pattern.. but this is not the point)
Have you had similar issues with the 15.0.0.223 ?
I created a bug report there : Bug#3851436 - BUG: flash player 15.0.0.223 reg exp

I escalated the bug to the engineering team.  My guess is that this is fallout from a recent security change to regex parsing.

Similar Messages

  • [svn:osmf:] 14601: Fix bug where parsing of stream that gets passed to NetStream.play doesn' t take urlIncludesFMSApplicationInstance into account, resulting in stream not found error.

    Revision: 14601
    Revision: 14601
    Author:   [email protected]
    Date:     2010-03-05 09:47:28 -0800 (Fri, 05 Mar 2010)
    Log Message:
    Fix bug where parsing of stream that gets passed to NetStream.play doesn't take urlIncludesFMSApplicationInstance into account, resulting in stream not found error.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/net/NetStreamPlayTrait.as
        osmf/trunk/framework/OSMF/org/osmf/net/NetStreamUtils.as
        osmf/trunk/framework/OSMF/org/osmf/net/dvr/DVRCastNetConnectionFactory.as
        osmf/trunk/framework/OSMFTest/org/osmf/net/TestNetStreamUtils.as

    I had a while ago similar problem with USB memory stick. At the end, I don't know why, just formatting it using WinXP helped me.
    S-
    Last edited by StenM (2011-07-22 17:56:32)

  • Huge bug in iPhoto since 9.3

    I used my iMac with Snow Leopard and iPhoto 9.2 and all was fine. Last Summer I bought my MB Retina with Mountain Lion and so I was able to use iPhoto 9.3. Several months I imported photos and then I installed aperture 3. I found out, that the focusing points are missing on all photos that are imported with iPhoto 9.3 or later. All photos imported with 9.2 or earlier were fine.
    So I deleted all photos since summer and imported them again with Aperture. Luckily I'm not trusting Apple that much, so I stored all my original photos additional to an extra harddrive outside iPhoto.
    I told the bug to the support, but it looks like, no one cares about. I've just updated to 9.4.3 and the bug is still there.

    Hello Harry468,
    please check the following, if iPhoto realy destroys the your photo data upon import, or if the problem is at any other point:
    open Finder
    rightclick on the iPhoto Library ->> leftclick show contents
    you are now within the iPhoto Library
    search the Masters or Original folder
    within one of this folders you find your events and within the events the single photos
    COPY one of these photos directly to the desktop and import
    it directly from Aperture..
    Are Focus Points correctly shown?
    If yes, then iPhoto doesn´t destroy the data, but nevertheless the old workflow can´t be used, because importing to iPhoto seems to make it impossible to use the Points in Aperture.
    And yes, I would also call this a bug, even if there are workarounds.

  • Mac book trackpad scroll BUG - been around since forever - please FIX it!

    Hi all
    This post is aimed for adobe reps
    I'm talking about the scrolling bug on macbooks trackpad and Apple external trackpad
    Sure, there are buggy JS work-arounds, but they don't cover the scenario we need
    Our app is a flex app, with one major scroller for the app, which is unusuable on macs
    Guys, this bug had been around for years
    last mention I came accross is here - http://forums.adobe.com/message/4740815
    and this is about it when it comes to googling for a solution.
    I asked in many forums - flash, flex, starling, feathers etc...
    all pointed back to the flash player
    If you don't intend to open-sourch the flash player runtime
    Can you please fix this nasty bug?
    it is critical, and the fact we can only wait for it to surface your priority lists makes your users feel helpless
    please respond
    please prioritize this bug
    it's basic and cuts of a whole market that will not be able to use our product because of it
    I erge you to consider this as critical
    Thank you

    Jeromie hello
    Encouraged by the possibility you opened - I opened up flash pro
    made the simplest test to see if  I have something basic to start from:
    mc.addEventListener(MouseEvent.MOUSE_WHEEL, on_wheel);
    function on_wheel(e:MouseEvent):void{
            trace('delta: '+e.delta);
    I'm using a macbook pro to test this, and no object seems to respond
    I tried listening on movieclips textfields the stage and the main timeline, without any of those responding
    I checked the reference, which claims it is supported only on windows.
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Interacti veObject.html#event:mouseWheel
    I even tried using flash professional built-in components like TextArea, ScrollPane (that are still maintained by Adobe) to see purhaps I missed something surely the Adobe engineers would solve on their own set of components
    but I guess the reference mentions it supports windows only for a reason...
    I hoped it would be out-dated but it seems like it has an updated status.
    it says:
    Dispatched when a mouse wheel is spun over an InteractiveObject instance. If the target is a text field, the text scrolls as the default behavior. Only available on Microsoft Windows operating systems.
    I've tested this behaviour in the browser and actually got something to respond:
    it works on a mac in Firefox, and Chrome, but not in safari
    found an example for you online you can check, it behaves the same.
    doesn't work on safari (most mackbook users use safari...)
    http://blog.flexexamples.com/wp-content/uploads/MouseWheel_test/bin/main.html
    here's another one that uses pure actionscript if you think it has something to do with flex rather then the flash player...
    1. Go to http://darkstar.puremvc.org/
    2. Try scrolling with your mouse wheel or trackpad once the window pops up. Nothing should happen.
    3. Now click the little green icon in the top-right of the application which toggles Fullscreen. Once in full screen, try scrolling with your mouse wheel or trackpad. Scroll should occur as expected.
    here is another simple one:
    works on chrome, doesn't respond on safari
    http://gingerbinger.com/wp-content/uploads/2011/03/MouseWheelSimple.swf
    Jeromie, if you can please point me to a single example that would support scrolling a container, or just catch mousewheel events on a MovieClip
    I would go ahead and build the component my self.
    As I value it as important enough.
    Your input is appreciated
    thanks
    PS:
    here's some really old links that try to complement the flash player lack of support for macs mousewheel events, by trying to inject those events using JavaScript and ExternalInterface:
    Those are old, buggy, not worthy to be called alternatives since they work under narrow restrictions, and frankly, I think the flash player deserves a much more serious support like adobe has for issues it actually want to support and not leave this one for open-source, since the player is propietery
    http://code.google.com/p/swfmousewheel/
    http://code.google.com/p/flex-wmode-mousewheel-handler-example/
    http://blog.earthbrowser.com/2009/01/simple-solution-for-mousewheel-events.html
    http://hasseg.org/blog/post/138/os-x-mouse-wheel-support-for-actionscript-3-flash-applicat ions-v2/
    http://labs.byhook.com/2010/04/09/flash-mouse-wheel-support/
    here is a flash player related bug created on 2009:
    http://bugs.adobe.com/jira/browse/FP-2247

  • Bug in finder since Mavricks 10.9.2 from 10.7.5

    Hi all,
    Since migration to Mavricks 10.9.2 from 10.7.5 i have two bugs in finder
    List view works until I try to open a shared device, after that list view dosen't work at all.
    Tabs features also not working at all.
    My machine is a :
    MacBook Pro
    13 pouces, mi-2009
    Processeur  2,53 GHz Intel Core 2 Duo
    Mémoire  4 Go 1067 MHz DDR3
    Graphisme  NVIDIA GeForce 9400M 256 Mo
    Logiciel  OS X 10.9.2 (13C64)
    Hope someone knows what to do with that "BUGG"
    Regrads
    Lionel

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you boot, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, reboot as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • Type Tool bug in Photoshop since latest update

    Found another annoying bug:
    1. Select your type tool and type something
    2. Press Shift and click anywhere else on your page
    It deselects the text you were working on and activates a new text box. Usually, I press shift and then drag the layer to keep it aligned as I drag the layer...now it acts like I want to create a new text box....sigh.

    You are correct but only if you are done typing do you press Ctrl +enter to close the type box. But sometimes, in mid-sentence if you decide you want to move the text box over to the right while you are still working on it, you could have (before the latest update), pressed shift and then just drag the text and then continue typing.
    It's not a "huge" deal but it is slightly annoying when you are used to working a certain way and you keep clicking "out" of the text you're working on.

  • Regex Parsing in powershell

    Trying to parse out IISLog and insert an * to separate columns but not sure how to combine the following into a line and insert * for import to excel,
    ^(\d{4}\-\d{2}\-\d{2}\s+\d{2}\:\d{2}\:\d{2}\s+\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s+?\GET\s+?\/owa/keepalive.owa)
    (\bserver.lab.local\b)
    (\blab\\tyo\b)
    (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s+)
    Filtered LOG:
    2013-12-18 00:27:16 192.168.10.99 GET /owa/keepalive.owa &Initial+Budget>>Conn:1,HangingConn:0,AD:18000/18000/0%,CAS:900
    00/90000/0%,AB:18000/18000/0%,RPC:90000/90000/0%,FC:1000/0,Policy:DefaultThrottlingPolicy_a434b282-f172-4e3d-abde-073fd
    a250426,Norm&v=14.3.158.1&mbx=server.lab.local&sessionId=52d807c3171944c081b9ccffaa64824e&prfltncy=
    2&prfrpccnt=0&prfrpcltncy=0&prfldpcnt=0&prfldpltncy=0&prfavlcnt=0&prfavlltncy=0&End+Budget>>Conn:1,HangingConn:0,AD:180
    00/18000/0%,CAS:90000/90000/0%,AB:18000/18000/0%,RPC:90000/90000/0%,FC:1000/0,Policy:DefaultThrottlingPolicy_a434b282-f
    172-4e3d-abde-073fda250426,Norm 443 lab\tyo 76.157.152.100 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW6
    4;+Trident/5.0) 200 0 0 0
    Trying to grab as follows and import to Excel: 
    2013-12-18 00:27:16 192.168.10.99 GET /owa/keepalive.owa server.lab.local lab\tyo 76.157.152.100 Mozilla/5.0+

    See - space delimited:
    PS C:\scripts> $i='2013-12-18 00:27:16 192.168.10.99 GET /owa/keepalive.owa server.lab.local lab\tyo 76.157.152.100 Mozilla/5.0+'
    PS C:\scripts> $i -replace ' ','|'
    2013-12-18|00:27:16|192.168.10.99|GET|/owa/keepalive.owa|server.lab.local|lab\tyo|76.157.152.100|Mozilla/5.0
    PS C:\scripts>
    See - all spaces become pipes.  Excel canalso import the file directly as a space-delimited file with a header.
    ¯\_(ツ)_/¯

  • Bugs in Illustrator since Update to CC 17.1

    Since Illy updated I have had multiple issues...
    Gradients won't change direction nor even change color with either the dropper nor just clicking on a swatch, changing angle in gradient pallette - just not responding! So, I ungrouped it (just an 8 letter word, drop shadow applied, changed to curves!) and reset the gradient that way, then regrouped and reapplied the gradient.
    Simple word changed to curves won't allow color to be applied.
    Simple word, after applyng a roughen style - won't clear appearance - won't revert back.
    Don't know what to do - can't get any work done at all... how do I re-install or go backwards?

    I had to reinstall, and it seems to be working OK now...

  • [BUG] Xml Parser of Jdev

    I tryed too many times modifing the file...
    but without sucess, jdev still show this error on xml of application.
    http://img218.imageshack.us/img218/3517/bug1bi.jpg
    thanks.

    You should be able to use the same xmlparserv2 archive that comes with JDeveloper 3.1.1.2 on both NT and UNIX. It's all java code, so the platform shouldn't matter.
    I would try that. It's possible the one you downloaded is newer.

  • Error parsing PLV file

    I get an error message attempting to use the 'Plan Visualizer'. I posted a question on this subject already and got the feedback from one of SAP's own HANA gurus that it probably is due to a bug ( Error parsing PLV file  ).
    Since I have not seen anybody else raising the same issue and there are others (my assumption) using the same set-up as I am (HANA SP8 on BW740 SP8) I suppose that it is very possible that it is not a real bug (since IF it indeed is a bug, others must have had the same problem).
    Is there anyway to get a confirmation if this is a bug (requiring a fix by e.g. OSS) or a problem specific to my installation/set-up/configuration that I might be able to fix (myself or with help).
    As you can imagine I am keen on solving this since it is quite a handicap to not be able to analyze the performance in the system.
    Thanks.

    For older versions of JRockit, you had to use exactly the same version of JRockit when you created the recording as when you opened it.
    With more recent versions (R26.0 and later iirc) it is sufficient if the JRA reader version is >= the version of JRockit producing the recording. Or in other words, make sure you are running the latest version of JRockit on your developer workstation.
    -- Henrik

  • ANN: Oracle XML Parser for Java v1.0.1.1 Maintenance

    The first maintenance release of the Oracle XML Parser for
    Java is available for download here.
    It has the following fixes and changes since 1.0.1:
    Bug Fixes:
    #843157, parseDTD(InputSource, rootElement) and
    parseDTD(URL, rootelement) then parse(InputSource) bugs;
    #843143, parse(InputSource) bug;
    #793012, no need to print a trace of an exception which is
    rethrown.
    Changes: None
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

    The first maintenance release of the Oracle XML Parser for
    Java is available for download here.
    It has the following fixes and changes since 1.0.1:
    Bug Fixes:
    #843157, parseDTD(InputSource, rootElement) and
    parseDTD(URL, rootelement) then parse(InputSource) bugs;
    #843143, parse(InputSource) bug;
    #793012, no need to print a trace of an exception which is
    rethrown.
    Changes: None
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • StAX implementation 'bugs'

    Hi,
    I'm trying out both the BEA reference implementation, and the weblogic implementation.
    The reference implementation works well, except for a bug in parsing. I've noticed
    that when an element contains only an entity reference as character data, it is
    not detected. e.g.
    <foo>
    <bar>&</bar>
    </foo>
    Will result in START_ELEMENT, START_ELEMENT, END_ELEMENT, END_ELEMENT events and
    does not produce an expected CHARACTERS event in the middle. I have not tested
    this with the weblogic implementation yet.
    As for the weblogic implementation, I'm having trouble using it in my streaming
    XML application. I need to parse incoming XML as it is sent to me. Unfortunately
    the weblogic implementation is evidently trying to fill a buffer on the initial
    xmlInputFactory.createXMLStreamReader(). The call doesn't return until the buffer
    is filled which will never occur in my case (the client sending XML to the server
    waits for a response before sending more XML than the opening tag, and the server
    needs to parse the opening tag sent by the client before it can generate that
    response). Is there a way to tell the weblogic implementation to change it's buffer
    size or, even better, to have it work like the reference implementation and parse
    what it reads before trying to read more? Buffering will be handled externally
    to the parser in my case so this forced buffering by the weblogic implementation
    ends up being a major problem.
    Thanks
    -iain

    Many thanks for the feedback!
    Bruce
    Iain Shigeoka wrote:
    >
    Bruce Stephens <[email protected]> wrote:
    The StAX guru says:
    It's not clear we can provide the requested behavior. The underlying
    processor reads the stream to setup the state. The parser needs to read
    ahead and no guaruntees are provided that say the underyling parser
    won't
    attempt to read ahead in the char stream.
    If you could provide a simple reproducer for this issue it would be
    appreciated.Hi,
    The particular use-case here is to support IETF XMPP streaming XML:
    http://www.ietf.org/html.charters/xmpp-charter.html
    In particular a tcp/ip connection is made between a client and server. The client
    sends an opening <stream> tag. The server must read that tag in, obtain information
    from the tag's attributes, then reply with it's own opening stream tag <stream>.
    The tag is not large in size but must be processed before more data is sent.
    Conceptually the socket holds two streaming XML documents (one c-s and one s-c)
    that are sent in a coordinate fashion (client sends some of it's xml, server reads
    that bit then sends some of it's xml, etc). The reference implementation loads
    it's buffer with the first read, then attempts to parse it before loading more
    data. This works great for XMPP since participants send complete XML 'parts' (e.g.
    the complete start tag, data to the next end tag, etc).
    The BEA implementation keeps trying to load more data to fill it's buffer before
    inspecting the data it has already read in. Thus it doesn't pull events as it's
    read unless it can fill it's buffer first.
    To replicate this, simply run the first simple xml printer example program from
    http://www.xml.com/pub/a/2003/09/17/stax.html?page=1, substituting the reading
    of a URL to the following:
    create a server socket on port 5222
    block on accept, when you get a connection
    Read the xml from the connection
    Now start that program, and run any XMPP/Jabber client against it. If you're on
    Windows, I'd suggest Exodus http://exodus.jabberstudio.org/ because you can use
    F12 to display a debug window showing the XML being sent and received. Alternatively,
    just telnet to port 5222 on localhost to connect to your new server, and type
    <stream>
    If you use the reference implementation, you'll see the program spit out 'stream'
    because it has seen it, and pulled the event. With the BEA implementation you'll
    never see the opening tag because it will stay blocked trying to read and fill
    it's buffer.
    If the 'required to fill buffer before parsing' behavior of the BEA implementation
    cannot be changed, can we have a way to set the buffer/read-ahead size? My streams
    can be buffered externally so I'd then set the stax buffer to '1' and should get
    the behavior I want.
    I understand that this behavior is not required by the Stax spec so if you decide
    not to support it in the BEA implementation I'd love to know so I can look for
    an implementation that does.
    Thanks
    -iain

  • XML serializing/deserializing versus parsing

    Hi all,
    This is not a strictly java question but after reading many discussions and creative solutions offered by different members of this forum, i feel that the right audience for my question are the folks in this very forum. Moderator, if you feel this question makes sense in a different forum, where it might get better responses feel free to move it.
    We are starting off on a new b2b web services project. Everyone in the group agreed that in order to appropriately serve the consumers in our space the best format to use is XML. We are java based and our first consumer is also java based, but we see in the future that our services will be consumed by other types of consumers as well. There seems to be a deep divide in how the xml structure should look like. There are two schools of thoughts. The first one (which is the popular one) is to have loosely typed tag names. Something like this
    <header>
    <map>
    <entry>
    <string>CUSTOMERNAME</string>
    <string>Mahesh</string>
    </entry>
    </map>
    </header>
    The idea being, we could dump regular marshalling/unmarshalling/parsing techniques in favor of a serializing/deserializing tool (Like XStream). The argument here is that we don't worry about a schema/parsing etc and always deal with some sort of generic collection. The other argument is that parsing is more heavier (in terms of performance) than serializing/deserializing.
    I believe that (i belong to the other less popular school of thought) any xml structure should have a real structure (strongly typed tag names). The problems i have with the proposed structure are
    1. They are not self describing, i.e. no wsdl
    2. They cant be parsed with a SAX parser (since there are no tag names, i dont think they can be parsed with a SAX parser, but if anyone here disagrees please correct me)
    3. Since regular parsing is out of the question, you cant predict how your consumers are using it.
    4. I think that the only place to use a serializing/deserializing technique is when you control both end points (producer and consumer).
    What i wanted to find out from the audience here is what they think of the pros/cons of the XML structure described above. Specifically in terms of
    1. Usablity
    2. Scalability
    3. Performance
    The generic structure is also being pitched as the 'next gen' way of defining and using XML. Is that true? Maybe i am just getting old and need to catch up.
    Any thoughts/comments are appreciated.

    user13698018 wrote:
    >
    What? Of course you can parse that "unstructured XML" with a SAX parser, why shouldn't you be able to do that? It's still XML after all.
    >
    You are right, it can be parsed. What i meant to say was i wont be able to extract information from it easily. For e.g. if i have to read the customer name what tag event will i look for? If i look for the event that fires off when i encounter tag name 'string' that will only give me the tag name and not the value. I have to come up with some sort of counter mechanism to disregard the first tag event and look at the second event. Is my assumption correct?Well, parsing the "freeform" XML with SAX requires a few tricks but can result in code that does pretty much the same thing.
    Since the information is exactly the same in both (except that one is a bit more verbose), I don't see any major differences in how it can be parsed.
    The only (seeming) difference is that for "strictly defined" XML you'll need to pre-define which tags/properties exist. But even that can be avoided by clever use of xs:any and allowing other namespaces (i.e. allow a mydata:favoriteColor tag inside your myStrictSchema:person tag).
    Once you do those, the two formats become even more equivalent: some of the advantages of having strictly-formed XML are lost (because you have to handle "unknown" tags again), while some of the disadvantages are lost as well (yeah! extensibility without modifying the core standard).
    In my (partially humble) opinion, the "free form XML" approach is often used when people are too lazy to investigate the wide variety of tools available via official XML techniques.
    >
    3. Since regular parsing is out of the question, you cant predict how your consumers are using it.
    >
    What i meant here was, if my consumers find regular parsing techniques difficult to parse they will resort to short cuts to extract the information (like regex to pull information) and that will make it difficult to predict how consumers are using the xml and hence make it difficult to plan for changes in the future. Am i over thinking here?That's always a possible problem and won't be avoided by any choice in data format. They will try it with "strict XML" and they will try it with "freeform XML". If you have some kind of consulting function, then you can try to communicate the dangers of this approach, but in the end you can hardly force people to "do it the right way".
    Which one would you use?I'd prefer the strictly specified one usually. But I don't know enough about the problem domain to give a qualified answer.

  • Parsing an xml file using xerces DOM  parser

    Hi
    I want to parse a simple xml file using DOM parser.
    The file is
    <Item>
         <SubItem>
              <title>SubItem0</title>
              <attr1>0</attr1>
              <attr2>0</attr2>
              <attr3>0</attr3>
         </SubItem>
         <SubItem>
              <title>SubItem1</title>
              <attr1>1</attr1>
              <attr2>0</attr2>
              <attr3>0</attr3>
         </SubItem>
         <SubItem>
              <title>SubItem2</title>
              <attr1>1</attr1>
              <attr2>1</attr2>
              <attr3>0</attr3>
              <SubItem>
                   <title>SubItem20</title>
                   <attr1>2</attr1>
                   <attr2>1</attr2>
                   <attr3>0</attr3>
              </SubItem>
              <SubItem>
                   <title>SubItem21</title>
                   <attr1>1</attr1>
                   <attr2>1</attr2>
                   <attr3>0</attr3>
              </SubItem>
         </SubItem>
    </Item>
    I just want to parse this file and want to store the values in desired datastructures,
    I am trying using DOM parser, since it gives a tree structure, which is ok in this case.
    public void init()
              InputReader ir     =new InputReader("Habsys");
              Document      doc     =ir.read("Habitat");
              System.out.println(doc);
              traverse(doc);
    private void traverse(Document idoc)
              NodeList lchildren=idoc.getElementsByTagName("SubItem");
              for(int i=0;i<lchildren.getLength();i++)
                   String lgstr=lchildren.item(i).getNodeName();
                   if(lgstr.equals("SubItem"))
                        traverse(lchildren.item(i));
    private void traverse (Node node) {
    int type = node.getNodeType();
    if (type == Node.ELEMENT_NODE)
    System.out.println ("Name :"+node.getNodeName());
    if(!node.hasChildNodes())
    System.out.println ("Value :"+node.getNodeValue());
    NodeList children = node.getChildNodes();
    if (children != null) {
    for (int i=0; i< children.getLength(); i++)
    traverse (children.item(i));
    But I am not getting required results, a lot of values I am getting as null
    Could anybody tell me how to retrieve the data from the xml file, I simply want to read data and store it in data structures. For eg, for tag Subitem with title as ' SubItem1' has attr1 as '1', attr2 as'0' and attr3 as '0'.
    Thanks
    Gaurav

    Check This Sample Code....
    public void amethod(){
    DocumentBuilderFactory dbf = null;
    DocumentBuilder docBuilder = null;
    Document doc = null;
    try{
         dbf = DocumentBuilderFactory.newInstance();
         db = dbf.newDocumentBuilder();
         doc = db.parse(New File("path/to/your/file"));
         Node root = doc.getDocumentElement();
         System.out.println("Root Node = " + root.getNodeName());
         readNode(root);
    }catch(FactoryConfigurationError fce){ fce.printStackTrace();
    }catch(ParserConfigurationException pce){  pce.printStackTrace();
    }catch(IOException ioe){  ioe.printStackTrace();
    }catch(SAXException saxe){  saxe.printStackTrace();
    private void readNode(Node node) {
    System.out.println("Current Node = " + node.getNodeName());
    readAttributes(node);
    readChildren(node);
    private void readAttributes(Node node) {
    if (!node.hasAttributes())
         return;
    System.out.println("Attributes:");
    NamedNodeMap attrNodes = node.getAttributes();
    for (int i=0; i<attrNodes.getLength(); i++) {
    Attr attr = (Attr)attrNodes.item(i);
    System.out.println(attr.getNodeName() + " => " + attr.getNodeValue());
    private void readChildren(Node node) {
    if (!node.hasChildNodes())
         return;
    System.out.println("Value/s:");
    NodeList childNodes = node.getChildNodes();
    for (int i=0; i<childNodes.getLength(); i++) {
    Node child = (Node)childNodes.item(i);
    if (child.getNodeType() == Node.ELEMENT_NODE) {
    readNode(child);
    continue;
    if (child.getNodeType() == Node.TEXT_NODE) {
    if (child.getNodeValue()!=null)
    System.out.println(child.getNodeValue());

  • I am stunned by TestStand suport engineer's answer to my bug report?

    Okay, my HTML is bit rusty. here it is.
    So, I ran into this problem that when I put a continued inequality expression (a<x<b) in a Pass/Fail step, it will always pass. This is very easy to duplicate, say you have a local varible x = 3, in a Pass/Fail test step's Data Source Expression you put "0<=Locals.x<=2". Then it will always pass when you run it. If you set b to less than 1, say 0.5, then it will always fail. So I reported this as a bug to NI support. Here is what I got for explanation:
    NI support/application engineer:
    "I was looking into this behavior further and what is actually happening is that for "a<=x<=b", the program is evaluating a<=x, returning 1 if true or 0 if false, and then checking if that 1 or 0 is <=b. This is why a pass was always returned by your code. I still think that recognizing the continued inequality expression would be a good addition to teststand, so i will suggest this change to R&D."
    me:
    "In that case, it's just simply wrong (as a bug would cause) since it assumes that b is somewhere between 0 and 1. I don't think that TestStand should check the Boolean return value from evaluating a<=x against b, that does not even make sense or someone did not know what he was doing. It should be reported as a bug, not a feature request for future release."
    NI support/application engineer:
    "I'm sorry that you feel this way, but this syntax would be executed in the same way by any programming language. the <= or < operators are treated like any operator such as * or +, and so this behavior is completely expected by order of operations. just as a*x*b would find a*x, then apply that result to {result}*b, a<x<b calculates the result of a<x (1 or 0) and applies that result to {result}<b. I do understand your frustration, but this is not a bug; it is completely expected behavior. Please let me know if you have any other questions about this issue."
    me:
    "Do you really want me to spell this out to you?! I would feel embarrassed if I were you. But you insisted, so here it goes.
    You are correct that these operators are treated the same in any programming language. Here is where you got lost, read this again - "just as a*x*b would find a*x, then apply that result to {result}*b, a<x<b calculates the result of a<x (1 or 0) and applies that result to {result}<b."
    Why in the world that you would substitute variable x with the result from evaluating a<x for the second comparison x<b?
    The answer is that "{result}<b is just NOT the same as x<b". Do you see the problem now?
    Do you know the difference between a Boolean and an integer? 1 and 0 can be used to present a Boolean, but when you plug it in an integer comparison and it will be used as an integer which throws the whole comparison out of water. I don't think that any other programming language would do that."
    NI support/application engineer:
    "I am very sorry that you were not satisfied with my explanation of the problem. I understand that this result is not desirable, but the underlying reason is that TestStand does not understand that you are trying to compare a<x and x<b in the same statement. The continued inequality is an implied conjunction of two comparisons, and TestStand (and other programming languages) do not know how to interpret this implication. I realize that this is not intuitive, and though I would agree that a<x<b seems like it would return 1 if x is between a and b and 0 otherwise, this is not a recognized syntax by TestStand and other languages."

    Hi CT,
    I agree with you completely that this may be undesired behavior depending upon exactly what code is being written. Thanks for bringing to our attention any behavior that seems undesired, we always want to know about these types of things!
    I ran the pseudo code "a<x<b" where a, x, and b are numbers in a few different environments:
    VB6: This returns true for any x value.
    C#: This does not compile, due to a type mismatch.
    C++: This returns true for any x value. 
    C: This returns true for any x value. 
    LabVIEW: Using comparison functions, this results in a broken wire due to a type mismatch 
    LabVIEW: Using a MathScript Node, this returns true for any x value.
    I would say, generally speaking, it is accepted behavior to
    type cast a Boolean result to an integer when the next function
    requires integer parameters. In every language, using  the logical AND operator, as Jigg suggested, removes any chance of ambiguity between the coder and the compiler.  
    The good news is that the product suggestion that the support engineer filed on your behalf will still be reviewed by R&D. So, whether this is a bug or a feature request, it will get its due attention.
    Message Edited by Evan P. on 10-15-2008 08:25 PM
    Evan Prothro
    RF Systems Engineer | NI

Maybe you are looking for