Re: [xml] Inserting node using xpath and schema



Resending since I did not receive any replies. Does anyone know the
answers to the questions below???

Thanks in advance,

Joe


-----Original Message-----
From: xml-bounces gnome org [mailto:xml-bounces gnome org] On Behalf Of
Kreidler Joseph-QA1818
Sent: Friday, August 18, 2006 11:40 AM
To: xml gnome org
Subject: [xml] Inserting node using xpath and schema

I'm fairly new to libxml2 and could not find answers to my questions
below by searching the FAQ and list archives. I'm trying to determine
how I can use libxml2 to accomplish the following:

- I have a parsed XML document in memory 
- I have multiple schemas for the document (a base schema and
extensions)
- I have an Xpath element expression and an element value

I want to be able to add the new element and value to the document based
on the Xpath expression and the schemas. The schema contains sequences
so the Xpath element has to inserted as a child node in between existing
siblings.

I can add a child node but its always after all of the existing
children.

Are there APIs that allow me to insert a node in between existing
sibling nodes?

Is there a way to use a schema to tell libxml2 to insert a node as a
child of a parent and the schema is used to determine the proper
location of the node amongst the existing children?

Thanks in advance,

Joe
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]