analysis tags such as <; tag / >; with saxparser
Hi all, using sax parser to analyze my xmlfile. everything is fine, except with tags of this type
Please be patient, as my post will litle bit biggie...
my xml file is:
47 table true YTD
When I try to analyse ReportField, GroupBy, in the output see 'table' and 'CDA' which are the values of the other tags just after those tags.
Here's the way am parsing the xml file.
public void Parse() { try{ XMLReader parser = XMLReaderFactory.createXMLReader(); parser.setContentHandler(this); InputStream is = getClass().getResourceAsStream("/xmlfile/Test2.xml"); InputSource iss = new InputSource(is); parser.parse(iss); } catch (IOException e) { System.out.println(e.getMessage()); } catch (SAXException e) { System.out.println(e.getMessage()); } } public void startElement(String nsURI, String strippedName,String tagName, Attributes attributes) throws SAXException { if(tagName.equalsIgnoreCase("ReportId")) cntctid = true; else if(tagName.equalsIgnoreCase("ReportName")) cname = true; else if(tagName.equalsIgnoreCase("ReportFields")) dear = true; else if(tagName.equalsIgnoreCase("IsAdvanced")) fname = true; else if(tagName.equalsIgnoreCase("GroupBy")) lname = true; } public void characters(char[] ch, int start, int length) { if (cntctid){ System.out.println("Title: " + new String(ch, start, length)); v_cid.addElement(new String(ch, start, length)); cntctid = false; } else if (cname){ System.out.println("Url: " + new String(ch, start,length)); v_cname.addElement(new String(ch, start, length)); cname = false; } else if (dear) { System.out.println("Title: " + new String(ch, start, length)); v_website.addElement(new String(ch, start, length)); dear = false; } else if (fname) { System.out.println("Url: " + new String(ch, start,length)); v_fname.addElement(new String(ch, start, length)); fname = false; } else if (lname){ String str = new String(ch, start,length); if(str.indexOf("\t")!= -1 ) str = "hai"; System.out.println("Dear: " + str); System.out.println("Url: " + new String(ch, start,length)); v_lname.addElement(str); lname = false; } }
This code works very well with the tags that are of type bc.
any help would be greatly appreciated!
Hi, sorry for the delay in response.
When I debug I found just as in endElement for tag GroupBy.
Tags: BlackBerry Developers
Similar Questions
-
Problem pairing and using Bluetooth THE TI sensor Tag with Z10
I can't pair and use THE TI Bluetooth sensor Tag with my Z10 on OS version 10.1.0.273.
I can find out the sensor with bt_disc_retrieve_devices Tag, but when I try to pair with bt_rdev_pair, I get an "Operation not permitted" error (EPERM). If I skip the step of pairing and just the list of services with a bt_rdev_get_services, I get an error "No such file or directory" (ENOENT). Same thing happens in the settings menu bluetooth where I can see the device, but it fails to the pair.
And then, when I try to connect directly to a service with bt_gatt_connect_service, I get an error 'No such device' (ENODEV), which leads me to believe that I have to be paired first to connect to a service.
The sensor Tag I pairs and connects very well with an iPhone 4S and on the flipside, my pairs fine Z10 with other devices THE bluetooth so I don't know which side prevents matching. I was actually at the session of JAM62 to BB Live 2013 and devices we were seemed to pair well with the TI sensor tag. Not sure if the version of the OS has nothing to do with it.
Anyone else having these issues with the TI sensor Tag matching or know of ways to solve this?
Updated the Tag TI with TI WHEAT SDK 1.3.2 sensor and now it matches successfully. Thank you!
-
but my tag with a key number has been deleted
I have a Compaq presario CQ61 laptop but my hard disk is damaged, I bought a new one, try to install vista but my tag with a key number has been cleared. How can I RECOVER my key for vista
Contact HP/Compaq and order a set of recovery disc for your computer - you can then install with those who, as they should not ask for a key. No one wants a register key your computer came with, except you.
-
802 1 q tagging with PIX 6.3 (1)
Someone uses VLAN tagging with PIX 6.3 (1)? I could make an ethernet (eth0, for example) as port trunking to carry vlan2, vlan3/vlan4. But the PIX does not define ethernet as an access port 1 belongs to the vlan 2. Or if I try to assign ethernet3 belongs to vlan3, it would be rejected by the PIX also.
I thought that the concept of PIX to award port trunking and a VLAN access port must be the same happening with catalyst, but it looks like I'm wrong. Anyone can point the right direction?
Best regards
Engel
Engel: Configure the VLAN on the PIX is not the same what to do on the switch. The PIX interfaces are not configured as 'trunk' or 'access' ports ports. With the PIX, you can assign a vlan is a physical interface - or assign a vlan as a logical on a physical interface interface. And vlan is limited to a single PIX - physical or logical interface, here's an example configuration:
interface ethernet1 100full
physical interface ethernet1 vlan50
logical interface ethernet1 vlan60
logical interface ethernet1 vlan70
logical interface ethernet1 vlan90
interface ethernet2 100full
physical interface ethernet2 vlan20
interface vlan1 ethernet2 logical
logical ethernet2 vlan30 interface
logical interface ethernet2 vlan40
!
nameif ethernet1 Win2K security52
nameif ethernet2 NT4 security90
nameif vlan60 User60 security53
nameif vlan70 utilisateur70 security54
nameif vlan90 User90 security55
nameif vlan1 management security91
nameif vlan30 Novell security50
nameif vlan40 various security51
!
address IP Win2K 10.2.50.1 255.255.255.0
address IP NT4 10.2.20.1 255.255.255.0
address IP User60 10.2.60.1 255.255.255.0
IP utilisateur70 10.2.70.1 255.255.255.0
address IP User90 10.1.90.1 255.255.255.0
10.2.1.1 management IP address 255.255.255.0
address IP Novell 10.2.30.1 255.255.255.0
address IP Misc 10.2.40.1 255.255.255.0
I hope this helps!
-
How to manage the Tags with PowerCli
Hello
I'm trying to find examples how to manage Customs 'Tags' in vSphere 5.1. This new feature is only used in the web client.
I would like to create, delete, and associate tags with PowerCli objects.
Is someone can tell me the basic commands?
Thank you.
Karl
Currently, there are no PowerCLI cmdlets to manage the tags.
But take a look at Create/Set TAGs via PowerCLI
-
How the elements tag with two tags?
With the following function I can tag with bold and italic tags xml elements. The problem is, I also need '< b > < i >' for example. Now my question is, how is that possible?
function tagStyles (myXmlElement) {}
app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
app.findChangeTextOptions.caseSensitive = false;
app.findChangeTextOptions.includeFootnotes = app.findChangeGrepOptions.includeFootnotes = false;
app.findChangeTextOptions.includeHiddenLayers = false;
app.findChangeTextOptions.includeLockedLayersForFind = false;
app.findChangeTextOptions.includeLockedStoriesForFind = false;
app.findChangeTextOptions.includeMasterPages = false;
app.findChangeTextOptions.wholeWord = false;
objectToTag = myXmlElement;
italic conversion
need to be developed for other styles
attention to the problems of nested xml tags
app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.findWhat = '. '. + » ;
app.findGrepPreferences.fontStyle = "italic";
var myFindTexts = myXmlElement.findGrep ();
If (myFindTexts.length > 0) {}
for (var j = 0; j < myFindTexts.length; j ++) {}
var myText = myFindTexts [j];
var myStartIndex = myText.characters [0] .index;
var = myText.characters [-1] .index myEndIndex;
objectToTag = objectToTag.xmlElements.add ({markupTag: "i", xmlContent:myText});})
myShift += 2;
}
}
conversion "BOLD"
need to be developed for other styles
attention to the problems of nested xml tags
app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.findWhat = '. '. + » ;
app.findGrepPreferences.fontStyle = "Bold";
var myFindTexts = myXmlElement.findGrep ();
If (myFindTexts.length > 0) {}
for (var j = 0; j < myFindTexts.length; j ++) {}
var myText = myFindTexts [j];
var myStartIndex = myText.characters [0] .index;
var = myText.characters [-1] .index myEndIndex;
objectToTag = objectToTag.xmlElements.add ({markupTag: "b", xmlContent:myText});})
}
}
bold italics conversion
need to be developed for other styles
attention to the problems of nested xml tags
app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.findWhat = '. '. + » ;
app.findGrepPreferences.fontStyle = "Bold Italic";
var myFindTexts = myXmlElement.findGrep ();
If (myFindTexts.length > 0) {}
for (var j = 0; j < myFindTexts.length; j ++) {}
var myText = myFindTexts [j];
var myStartIndex = myText.characters [0] .index;
var = myText.characters [-1] .index myEndIndex;
objectToTag = objectToTag.xmlElements.add ({markupTag: "b", xmlContent:myText});})
}
objectToTag = myXmlElement;
for (var j = 0; j < myFindTexts.length; j ++) {}
var myText = myFindTexts [j];
var myStartIndex = myText.characters [0] .index;
var = myText.characters [-1] .index myEndIndex;
objectToTag = objectToTag.xmlElements.add ({markupTag: "i", xmlContent:myText});})
}
}
}
When there is an element with the "Bold Italic" style it looks like this: 'my element with < b > < /b > < i > "BOLD" and the italic text < /i > '. There it looks like this: ' my element with < b > < i > bold and italic < /i > < / b > text.
Does anyone have an idea on this?
Thanks in advance!
Dear Stamm,
Try this...
objectToTag = objectToTag.xmlElements.add ({markupTag: "b", xmlContent:myText});})
App.Select (objectToTag.texts);
App.Selection [0] .associatedXMLElements [0].xmlElements.Add ("i", app.selection [0]);
Kind regards
Bala
-
Anyone use the <; cfdocument >; tag with a <; cfloop >;
Anyone use the < cfdocument > tag with a < cfloop >
I'm generating more documents like this.
< cfloop query = "myquery" >
< cfdocument type = pdf >
< html >... .HTML code here... < html >
< / cfdocument >
< / cfloop >
But only the first document is generated in the browser?
My requirement that I want to create multiple PDF and publish to folder and zip folder so that the user can able to download the ZIP file
Thanks in advance
My requirement that I want to create multiple PDF and publish to folder and zip folder so that the user can able to download the ZIP file
(1) create a folder named, say, docsDir, in the current directory.
(2) create PDF files, using suggestion of Eddie Lotter, name each file dynamically and store them in the folder docsDir.
Insert here the code to generate the content of
#filename # .(3) zip file, docsDir, store the resulting file, docsDir.zip, in the current directory.
-
Open Office has a verification option to bring back a deleted word or a line. Y at - it such an option with Pages?
Raymond,
Try using the hotkey (⌘Z)
-
What is best practices for integrating HTML in the tag < mx:XML >? Programmatically, I can successfully implement this:
[Bindable]
public var xmlDP:XML = < data component = "" & lt; "/ >;"
However, I get the following error if I try to keep the same data row in a mx:XML tag, as such:
< mx:XML id = "xmlDP" >
< data component = "" & lt; "/ >"
< / mx:XML >
Error #1095: XML parser failure: attribute not completed.
If I modify as follows the MXML tag, it works fine:
< mx:XML id = "xmlDP" >
< data component = "& amp; Lt; "/ >
< / mx:XML >
Unfortunately, I also can I supply not the tag mx:XML to a XML file which uses & lt; or & gt; the codes, because it gives the same results. This leads me to believe that the < mx:XML > tag does not support special character codes for < and >, but why?
Either way, this code also gives an error 1095:
< mx:XML id = "xmlDP" >
< data component = "" & #0060; "/ >"
< / mx:XML >
A problem with my data source because it is not hand typed in Flex, and the XML standard supports the & lt; and & gt; codes. I tried a string of HTML complete, as shown below, but it also generates the error:
< mx:XML id = "xmlDP" >
< data component = "& lt; b & gt; Test & lt; /b & gt; "/ >
< / mx:XML >
Thank you very much for any input that you may have!This:
"has the same problem, the.<" gets="" parsed="" by="" the="" mxml="" parser="" long="" before="" the="" "escape"="" has="" any="" meaning="" at="">">Your last example XMLDeclaration com Tower has come full circle: it is him even that you posted in your first post and still has the same problem. This is not a bug in the compiler.
I advise the encoding of special characters using the form URL (%), then use escape() to decode the attribute values.
Tracy
-
How can I control or change the ID3 tags with the new v12.4 of iTunes?
On the latest version of iTunes (12.3), right click on a file gave the option "Convert ID3 Tags"... ».
But with the new iTunes (12.4), this option has disappeared and I can't find a way to control the tag on mp3s.
Mr Apple, why put obstacles for those working?
It is still possible, but is no longer a part of the menu of right - or control-click option. Now, it is available at:
- File / create new Version...
Don't know why it was deleted, but Apple say:
-
How to hide the display of tags with the icons of bookmark in the bookmarks bar
I just changed a new PC Tower, and I'll set up Firefox for the 2nd time. I was using Firefox on my old PC and somehow got only the icons to display in the bookmarks toolbar. If you hover your mouse over the icon, you can see the tag information.
I don't remember how I did it.
Roomy Bookmarks Toolbar -> https://addons.mozilla.org/en-US/firefox/addon/roomy-bookmarks-toolbar/
- After the installation, set the options: Modules > Extensions > roomy Bookmarks Toolbar > Options
If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.
Not related to your question, but...
You may need to update some plug-ins. Check your plug-ins and update if necessary:
- Plugin check-> http://www.mozilla.org/en-US/plugincheck/
- Adobe Shockwave for Director Netscape plug-in: install (or update) the Shockwave with Firefox plugin
- Adobe PDF plug-in for Firefox and Netscape: Installation/update Adobe Reader in Firefox
- Shockwave Flash (Adobe Flash or Flash): updated Flash in Firefox
- Next-generation Java plug-in for the Mozilla browser: install or update Java in Firefox
-
pouches &; ID tag with e260 problem
Can anyone help with these 2 problems:
Every album I put on the e260 has 1 album art, with a few albums, they are displayed with the other not? I changed the album art for another with a different size, but nothing works. The album art is in the right place, so I don't know how to solve this problem.
Second problem. I had an album that the e260 divided into 3 albums with the same name. 2 albums with just 1 song and the 3rd with the rest of the songs. I discovered he needed with identification labels, because on 1 label the name of the album was written poorly, so I changed the name of the album, but the problem continues. What can I do for all the song in this album are found in only 1 album on my e260. As far as I know has nothing to do with the mp3 licenses, so what it can be?
Thank you very much!!!
I solved the problem of ID tag by changing the artist and the name of the album of all the songs with MP3tag. It must have been a space that I forgot because everything seemed the same. Thanks for helping me on this one!
The album art problem remains. The name does not matter because the albums on which the name appears art are all different. I tried to call it folder.jpg anyway, but no. Why so strange on some albums it works and others not. Any other suggestions? Thank you!
-
Under Android Runtime NDEF tags with 10.3.1 write error
I'm trying to get an app Android our company wrote working under Blackberry using the NFC support newly added to 10.3.
I use a Q10 to test 10.3.1 running, and I'm able to get the installed application and reading our NDEF labels without problem. Attempt to erase or write tags but seems to fail, while this works very well on our test Android devices. I get the following in the logcat when debugging:
18968818-11/com.app.apptest D/BBNfcConnector? FC polling result: 1 18968818-11/com.app.apptest D/BBNfcConnector? Changes detected from index(0) FD(37) 18968818-11/com.app.apptest D/BBNfcConnector? connection ID available for target 18968818-11/com.app.apptest D/BBNfcConnector? Msg count 1, rc=0 18968818-11/com.app.apptest I/BBNfcConnector? Notify subscriber with NFC event, type=2 18968818-11/com.app.apptest I/BBNfcAdapter? NFC Event received, type=2 18968818-11/com.app.apptest D/NfcTarget? Content of target: 18968818-11/com.app.apptest D/NfcTarget? NDEF_TYPE : 2 18968818-11/com.app.apptest D/NfcTarget? NDEF_LOCKED : FALSE 18968818-11/com.app.apptest D/NfcTarget? NDEF_LOCKABLE : TRUE 18968818-11/com.app.apptest D/NfcTarget? NDEF_FREE_SPACE : 134 18968818-11/com.app.apptest D/NfcTarget? NDEF_CAPABLE_TYPE : 18968818-11/com.app.apptest I/NfcDispatcher? DispatchInfo URI:null MIME:null 18968818-11/com.app.apptest D/BBNfcConnector? Polling NFC FD(37) 18968818-1/com.app.apptest I/BBNfcTag? BBNfcTag_ReaderWriter_nfcUnregister: done 18968818-1/com.app.apptest E/BBNfcTag? BBNfcTag_nfcNdefWrite: Error 7, target=0x11bd7020 18968818-1/com.app.apptest W/System.err? java.io.IOException 18968818-1/com.app.apptest W/System.err? at android.nfc.tech.Ndef.writeNdefMessage(Ndef.java:319)
The calling code is something like the below:
/**Writes out a URI Ndef record along with a text record in one go*/ private void writeNdef(String text, Tag tag) throws IOException, FormatException { //First record is a weblink, then our ID data so that unanticipated tag scans respond gracefully NdefRecord[] records = {NdefRecord.createUri("http://www.google.com"), createRecord(text) }; NdefMessage message = new NdefMessage(records); issueNdef(message, tag); } /**Performs the actual connection to the NFC tag and writes out the given message to it*/ private void issueNdef(NdefMessage message, Tag tag) throws IOException, FormatException { Ndef ndef = Ndef.get(tag); ndef.connect(); ndef.writeNdefMessage(message); ndef.close(); }
Shows the system to launch a "BBNfcTag_nfcNdefWrite: error 7" when he tries to deliver scripture to the tag in question (the exact IOException occurs at the level of the line "ndef.writeNdefMessage (message);" '). We use fairly standard NTAG203 tags and they are tested as works fine on other devices. Any ideas as to why I have trouble getting these tags to write on the BlackBerry?
Mark,
Thanks for the sample; It was useful to detect the problem (now resolved) by comparison.
For someone else who comes across this thread, the question was how I was manipulating the intent of NFC tag. On my other test devices (android), immediately call my intention of onNewIntent() handler as shown below:
@Override protected void onNewIntent(Intent intent) { intentHandler.Dispatch(intent); }
works very well. On BlackBerry, an NFC unsubscribe occurs immediately when the triggers of the intention and the context seems to be lost if try to call directly. Instead, I needed to run a setIntent() and then manage OnResume intent, taking care to add a boolean indicator so it tries only to interface with the NFC tag only once and that the curriculum vitae triggered by the intentions of the NFC. See below:
private boolean intentHandled = true; @Override protected void onResume() { super.onResume(); //... if(intentHandled == false && (NfcAdapter.ACTION_TAG_DISCOVERED.equals(getIntent().getAction()) || NfcAdapter.ACTION_NDEF_DISCOVERED.equals(getIntent().getAction()))) { //Decide what to do based on tag type and current program view intentHandler.Dispatch(getIntent()); intentHandled = true; } } @Override protected void onNewIntent(Intent intent) { intentHandled = false; setIntent(intent); }
With these changes, I am able to get writing reliable tag on my Q10 without negative impact on my ability to write on my other devices Android test.
-
tag with html content - supported tags?
In one of the beta label could now handle html in its data from text content:
Label.setText(")
ASDF
")But I was not able to find the html tags are supported... someone has seen a document concerning the supported tags or knows what are the supported tags?
-
In the Device.xml file, it starts with the tags of the os. Each os has a memory attribute. What are the optional values for the attribute memory?
Can we really control the memory for the simulators?
0x85000F03 0x8C000F03 0x87000F03 0x84001503 0x86001503 0x04001507 0x0F001507 0x0C001404 0x0D001404 0x0E001404 0x0D000D04 0x16000D04 0x05001504 0x07001504 These values refer to specific hardware configurations are simulated. They should not be changed.
Maybe you are looking for
-
How to order recovery of product for my Satellite M60 - 104?
Hello I have a portable Satellite M60-104. I want to recovery of product, however, I seem to have lost my product recovery dvd. Is there anyway where I can re - order one for this laptop, or download from internet (if so, where!) Thank you Sunny
-
Hi all Now I want to add a 4 GB of ram to my B520 (2120 i3, 4 GB ddr3) The problem that the type available in my area is SODIMM DDR3-1600 PC3-12800 memoryNo PC3-10600 DDR3-1333 memory as mentioned in the documents of material. If the type of 1600 MHz
-
How can I probe wire values within a class?
Hi all I use a Modbus Library built using classes. I need to view the data inside a VI that is part of a class in a tree inheritance. I can't set a breakpoint in this class, or the sons of the probe or retain the yarn values. I looked into creating a
-
Hello I am under Win XP Professional SP3 and will have the following problem with microsoft update. WinXP guard download and try to install KB2656352, KB2572073 and KB2633880 when they are already installed! If I try to hide these high priority updat
-
XP, re - install works but can not reach active state
Hello. I have two computers - 1 desktop and 1 laptop with genuine COA for Windows XP and Windows XP Home Edition. They run Ubuntu Linux for the last year or two, but now I want to reload XP on them. However, the WGA download does not work and now the