Questions tagged [xom]

XOM™ is a new XML object model. It is an open source (LGPL), tree-based API for processing XML with Java that strives for correctness, simplicity, and performance.

XOM™ is a new XML object model. It is an open source (LGPL), tree-based API for processing XML with Java that strives for correctness, simplicity, and performance.

XOM is designed to be easy to learn and easy to use. It works very straight-forwardly, and has a very shallow learning curve. Assuming you're already familiar with XML, you should be able to get up and running with XOM very quickly.

References:

91 questions
0
votes
1 answer

Java+XSL, calling Java code from within template

I'm working with XSL templates in Java, and I'm trying to build a custom tag that will call some Java code, then put a result inside the template. I'm using XOM as my XML engine. I'm kind of new with both XOM and XSL, so I'm not even sure if this is…
Mike
  • 58,961
  • 76
  • 175
  • 221
0
votes
1 answer

How to get regex into XPath expressions via nu.XOM API?

I'd like to know if XOM allows regex in it's XPath expressions. As far as I know regex is only available in XPath 2.0 via the match() function. It seems that XOM doesn't support this function. Is their another way to use regex in XPath?
cobby
  • 484
  • 3
  • 18
0
votes
1 answer

How to access a child Element of a node that is not an XML tag in XOM?

How do I access the = child element of the done node as shown in code below in XOM? =
Mover
  • 169
  • 12
0
votes
1 answer

Inserting new node in XOM to an XML document at a specified Index; using insertChild() method

I am fairly new to XOM. I want to insert a child( ) into the node at a specified index but what I get in the XML document at the correct position is <stmt > </stmt> and this is what I am really after…
Mover
  • 169
  • 12
0
votes
0 answers

How to use XOM to query and manipulate XML tags converted from srcml

Please bear with me. I am newbie to parsing. I want to use XOM to query an xml document and modify the code. Example - x_int=10;
cyrax265
  • 3
  • 4
0
votes
1 answer

how to return serialized XML file (XOM document), so that i can display it in browser?

This prints my xml document on the console with pretty print. //writing output to a file Document writeDocument = new Document(document); //Formatting the file Serializer serializer = new Serializer(System.out,…
Lalu
  • 1
  • 3
0
votes
0 answers

JRules/WODM Dependencies or XOM Library

I am using a Java XOM for a Project which is supported by a library of Java Classes, I call is Util XOM. My understanding is that any Dependency JAR (Library) for execution of Rules is packaged and deployed into the classpath of the Rule…
user3010878
  • 101
  • 1
  • 2
0
votes
1 answer

how to write XOM document to XML file with pretty print?

I used the following code to write the xml import nu.xom.Document; import nu.xom.Element; import nu.xom.Serializer; Element root = new Element("ADT"); root.addNamespaceDeclaration("xsi","http://www.w3.org/2001/XMLSchema"); …
Ramindu De Silva
  • 194
  • 4
  • 13
0
votes
2 answers

XOM getting attribute from Node?

Shouldn't something like this work? Assuming a document formatted as such: Node node = doc.query("/root/element").get(0); String id = node.getDocument().getRootElement().getAttribute("id"); When I…
Stefan Kendall
  • 66,414
  • 68
  • 253
  • 406
0
votes
1 answer

Append HTML to XOM element

I need to prepend HTML to existed XOM element. HTML represented as a String. Here are my actions Parse String into XOM Document Remove root element(X) from Document Prepend X to desired target element (Y) I get an…
aleks.n.fedorov
  • 322
  • 1
  • 2
  • 10
0
votes
2 answers

XOM Parser Out of heap memory

I am parsing files using XOM library. The Java application works well but I meet a memory problem when I parse large files more than 200 MBs. I face a heap size memory when I build the file using the below piece of code Builder…
mowienay
  • 1,264
  • 4
  • 19
  • 32
0
votes
1 answer

XOM testing at xubuntu are fail

I tried to use XOM at my easy project for generate xml files. I follow instructions Installing XOM. I added jar to my project it works perfect. But I can't run their easy test example: To check your download you can run one of the sample programs…
catch23
  • 17,519
  • 42
  • 144
  • 217
0
votes
2 answers

how to deploy a ruleApp contains xom that based on java jars to ilog execution server

I have an ilog jrules execution server 7.1 installed. and I want to deploy a ruleApp that contains xom based on java jars. I don't know where can I package my resources jar for the ilog server? when i deploy it from the rule designer it doesn't…
Brachi
  • 637
  • 9
  • 17
0
votes
1 answer

XOM Parser Element.getAttributeValue() returns null if attribute name has :

I have been using XOM parser in a project that is mostly over. The parser is very good and I find it mostly stable. However today I was parsing an XML element with an attribute called "xml:lang" The getAttributeValue("xml:lang") returned null…
mowienay
  • 1,264
  • 4
  • 19
  • 32
0
votes
2 answers

Java Data Structure to store flat XML data for later access

I have a 5 MB XML flat structure that I want to access its data later. I use XOM Parser in Java to parse the XML and I don't want to loop on the whole Tree every time I want to retrieve data as it takes a while because of the file size. The XML…
mowienay
  • 1,264
  • 4
  • 19
  • 32