java - Fetch value of a node's attribute in XML -


i have xml document, snippet of below:

<item name="entrydataitem" type="dataview" caption="__entry_data_item" id="208" formitem="selectbox">  <properties>   <property name="caption" value="task type"/>   <property name="name" value="task_type"/>   </properties> </item> <item name="entrydataitem" type="dataview" caption="__entry_data_item"  id="211" formitem="text"> <properties>   <property name="caption" value="time spent (min)"/>   <property name="name" value="time_spent_min"/>   </properties> </item>   

etc.

there other "properties" well. value of "task_type" other properties stored in database. when iterate through document, properties fetched , document prepared "caption" , "value" xml. problem , "properties" printed. want contents of document based on "task_type"; when task_type value testing", task_type "estimation" printed , nothing else.


i understand have put check before document being prepared.
question is: how put condition when have "task_type" in xml , not value(eg."testing") directly within xml document?


my code simple java code.
how can achived appreciated.


in opinion, xpath bee's knees when comes going after specific items in xml document. this article might of use if it's want persue.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -