Questions tagged [joox]

jOOX stands for Java Object Oriented XML. It is a simple wrapper for the org.w3c.dom package, to allow fluent XML document creation and manipulation.

jOOX stands for Java Object Oriented XML. It is a simple wrapper for the org.w3c.dom package, to allow for fluent XML document creation and manipulation where DOM is required but too verbose. jOOX only wraps the underlying document and can be used to enhance DOM, not as an alternative.

See http://code.google.com/p/joox/

15 questions
2
votes
2 answers

How to create a new xml file with Joox

I'm trying to create a new xml with a structure and at the same time add elements via this String styleName = "myStyle"; String styleKey = "styleKeyValue"; File file = new File("test.xml"); DocumentBuilderFactory dbf =…
Dazed
  • 1,069
  • 9
  • 34
2
votes
1 answer

Returning first level tag in JOOX

I've following xml:
Jakub Kubrynski
  • 13,724
  • 6
  • 60
  • 85
1
vote
1 answer

Using JOOX to filter xml data from REST endpoint

I've a REST endpoint that returns XML like this (the XML is of course bigger say around 10,000 blocks of data vs the 3 blocks I show in this example): Gambardella,…
Yana
  • 293
  • 1
  • 3
  • 11
1
vote
1 answer

save modifications in xml file with joox

i have xml file and i want to add elements and save it with joox my xml file 1984 George Orwell
sako
  • 29
  • 5
1
vote
1 answer

How to iterate over a xml file using joox api for java?

I have: value1 value2
jechaviz
  • 551
  • 1
  • 9
  • 23
1
vote
2 answers

Parse Xml String with Joox

How do I parse a Xml String with jOOx? The parse method accepts String uri, but not Xml String.
quarks
  • 33,478
  • 73
  • 290
  • 513
1
vote
1 answer

Can I use jOOX to find the xPath of an attribute?

jOOX can be used to find the xPath of an element using something like this: Element element = (Element) someNode; String xPath = $(element).xpath(); Can I do the same for an attribute? I tried this: Attr attr = (Attr) someAttributeNode; String…
james.garriss
  • 12,959
  • 7
  • 83
  • 96
0
votes
3 answers

import static org.joox.JOOX.*: - The import cannot be resolved

It's rather a simple problem (I'm a beginner). I'm using Eclipse. I just don't know why it won't work to import JOOX. I browsed and tried changing the JRE/JDK, it didn't help though. I'd be thankful for any help!
Raphael
  • 13
  • 2
0
votes
1 answer

JOOX: get value of Element

While playing around with JOOX I seem to struggle with the concept of actually getting some values from elements. Consider the following XML:
John Smith
  • 752
  • 9
  • 35
0
votes
1 answer

JOOX self closing XML tag

I have problem when using JOOX for transforming XMLs. I am doing some changes to element matching the fieldTag I have a code as following: Match xml = $(new StringReader(content.toString())); Match find = xml.find(fieldTag); …
Seng Zhe
  • 613
  • 1
  • 11
  • 21
0
votes
1 answer

Filter XML with 2 conditions using JOOX and XPATH (JAVA)

I have many xml files to filter and I need to do it with JOOX. I'm using it with XPATH to filter by one condition but I need at least two conditions, I would like to be a dynamic filtering to which I could add more filters if it's requested, but at…
master89
  • 27
  • 2
  • 7
0
votes
1 answer

Filter XML fields with JOOX

I need to filter many XML files like this:
1
... I need to pick only all the message content whose header.type == 1. I'm reading from…
master89
  • 27
  • 2
  • 7
0
votes
1 answer

Filter XML Elements using JOOX then Write Full Document

Imagine an XML document like this: I want to write the doc to a new file after filtering out some books. I'm using JOOX and have some…
Dave L.
  • 9,595
  • 7
  • 43
  • 69
0
votes
1 answer

Proper way to retrieve parent nodes in JOOX

Suppose I have two Match nodes, and I try to parent one to the other, and then I try to retrieve the child's parent node. Match p = $("parent"); Match c = $("child"); p.append(c); Object o = c.parent(); At this point, o seems to be an empty…
Jesús Zazueta
  • 1,160
  • 1
  • 17
  • 32
0
votes
2 answers

JOOX Namespace Support

I'm trying to run some xpath queries on some XML that contains namespaces. Unfortunately it's giving me a rather horrid error message as it does not understand the namespaces in the xpath query or the XML. A sample xpath query is:…
mrswadge
  • 1,659
  • 1
  • 20
  • 43